anydi 0.32.1__tar.gz → 0.32.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.
- {anydi-0.32.1 → anydi-0.32.2}/PKG-INFO +1 -1
- {anydi-0.32.1 → anydi-0.32.2}/anydi/_provider.py +6 -0
- {anydi-0.32.1 → anydi-0.32.2}/pyproject.toml +1 -1
- {anydi-0.32.1 → anydi-0.32.2}/LICENSE +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/README.md +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/__init__.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/_container.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/_context.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/_injector.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/_logger.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/_module.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/_scanner.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/_types.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/_utils.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/__init__.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/_utils.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/django/__init__.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/django/_container.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/django/_settings.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/django/_utils.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/django/apps.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/django/middleware.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/django/ninja/__init__.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/django/ninja/_operation.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/django/ninja/_signature.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/fastapi.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/faststream.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/pydantic_settings.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/pytest_plugin.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/starlette/__init__.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/ext/starlette/middleware.py +0 -0
- {anydi-0.32.1 → anydi-0.32.2}/anydi/py.typed +0 -0
|
@@ -106,6 +106,12 @@ class Provider:
|
|
|
106
106
|
|
|
107
107
|
def _validate_scope(self) -> None:
|
|
108
108
|
"""Validate the scope of the provider."""
|
|
109
|
+
if self.scope not in get_args(Scope):
|
|
110
|
+
raise ValueError(
|
|
111
|
+
"The scope provided is invalid. Only the following scopes are "
|
|
112
|
+
f"supported: {', '.join(get_args(Scope))}. Please use one of the "
|
|
113
|
+
"supported scopes when registering a provider."
|
|
114
|
+
)
|
|
109
115
|
if self.is_resource and self.scope == "transient":
|
|
110
116
|
raise TypeError(
|
|
111
117
|
f"The resource provider `{self}` is attempting to register "
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|