anydi 0.37.1__tar.gz → 0.37.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {anydi-0.37.1 → anydi-0.37.2}/PKG-INFO +1 -1
  2. {anydi-0.37.1 → anydi-0.37.2}/anydi/_container.py +4 -4
  3. {anydi-0.37.1 → anydi-0.37.2}/pyproject.toml +1 -1
  4. {anydi-0.37.1 → anydi-0.37.2}/LICENSE +0 -0
  5. {anydi-0.37.1 → anydi-0.37.2}/README.md +0 -0
  6. {anydi-0.37.1 → anydi-0.37.2}/anydi/__init__.py +0 -0
  7. {anydi-0.37.1 → anydi-0.37.2}/anydi/_context.py +0 -0
  8. {anydi-0.37.1 → anydi-0.37.2}/anydi/_provider.py +0 -0
  9. {anydi-0.37.1 → anydi-0.37.2}/anydi/_types.py +0 -0
  10. {anydi-0.37.1 → anydi-0.37.2}/anydi/_utils.py +0 -0
  11. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/__init__.py +0 -0
  12. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/_utils.py +0 -0
  13. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/django/__init__.py +0 -0
  14. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/django/_container.py +0 -0
  15. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/django/_settings.py +0 -0
  16. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/django/_utils.py +0 -0
  17. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/django/apps.py +0 -0
  18. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/django/middleware.py +0 -0
  19. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/django/ninja/__init__.py +0 -0
  20. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/django/ninja/_operation.py +0 -0
  21. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/django/ninja/_signature.py +0 -0
  22. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/fastapi.py +0 -0
  23. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/faststream.py +0 -0
  24. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/pydantic_settings.py +0 -0
  25. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/pytest_plugin.py +0 -0
  26. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/starlette/__init__.py +0 -0
  27. {anydi-0.37.1 → anydi-0.37.2}/anydi/ext/starlette/middleware.py +0 -0
  28. {anydi-0.37.1 → anydi-0.37.2}/anydi/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: anydi
3
- Version: 0.37.1
3
+ Version: 0.37.2
4
4
  Summary: Dependency Injection library
5
5
  Home-page: https://github.com/antonrh/anydi
6
6
  License: MIT
@@ -622,7 +622,7 @@ class Container:
622
622
 
623
623
  # Try to get instance from defaults
624
624
  if parameter.name in defaults:
625
- instance = defaults[parameter.name]
625
+ return defaults[parameter.name]
626
626
 
627
627
  # Try to get instance from context
628
628
  elif context and parameter.annotation in context:
@@ -635,7 +635,7 @@ class Container:
635
635
  except LookupError:
636
636
  if parameter.default is inspect.Parameter.empty:
637
637
  raise
638
- instance = parameter.default
638
+ return parameter.default
639
639
 
640
640
  # Wrap the instance in a proxy for testing
641
641
  if self.testing:
@@ -666,7 +666,7 @@ class Container:
666
666
 
667
667
  # Try to get instance from defaults
668
668
  if parameter.name in defaults:
669
- instance = defaults[parameter.name]
669
+ return defaults[parameter.name]
670
670
 
671
671
  # Try to get instance from context
672
672
  elif context and parameter.annotation in context:
@@ -679,7 +679,7 @@ class Container:
679
679
  except LookupError:
680
680
  if parameter.default is inspect.Parameter.empty:
681
681
  raise
682
- instance = parameter.default
682
+ return parameter.default
683
683
 
684
684
  # Wrap the instance in a proxy for testing
685
685
  if self.testing:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "anydi"
3
- version = "0.37.1"
3
+ version = "0.37.2"
4
4
  description = "Dependency Injection library"
5
5
  authors = ["Anton Ruhlov <antonruhlov@gmail.com>"]
6
6
  license = "MIT"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes