anydi 0.32.1__py3-none-any.whl → 0.32.2__py3-none-any.whl

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/_provider.py CHANGED
@@ -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 "
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: anydi
3
- Version: 0.32.1
3
+ Version: 0.32.2
4
4
  Summary: Dependency Injection library
5
5
  Home-page: https://github.com/antonrh/anydi
6
6
  License: MIT
@@ -4,7 +4,7 @@ anydi/_context.py,sha256=XSXBpSCm6zwR5otLN2cj_mPDQXTM18aN6vmJhiNEoL4,11697
4
4
  anydi/_injector.py,sha256=GdI4NdcB72sJPyBFh9ZKyPflEs-6HaUbiHN2H5QIgHY,3454
5
5
  anydi/_logger.py,sha256=UpubJUnW83kffFxkhUlObm2DmZX1Pjqoz9YFKS-JOPg,52
6
6
  anydi/_module.py,sha256=cgojC7Z7oMtsUnkfSc65cRYOfZ8Q6KwjusNJzx_VSbk,2729
7
- anydi/_provider.py,sha256=tzEXwh9bzRirtGe_Kz2MB22kQxU6qmoofjwGNQPWUNI,5876
7
+ anydi/_provider.py,sha256=-CJXDvAEdV2IX--0XWAFhAs_LH_9cGp9XhhrrczuMgM,6193
8
8
  anydi/_scanner.py,sha256=F2sHgJvkRYXYnu4F5iSrnIPVzwnNeS7tRPXziirh4NI,4898
9
9
  anydi/_types.py,sha256=At2VeJgwNC0gwMqdL0tkGtjSFsqOdrQStDwyzAGugr4,796
10
10
  anydi/_utils.py,sha256=guw4sFCvsisJmneKWlZi18YDYll_CjlO_f2cH97rDFQ,3280
@@ -26,8 +26,8 @@ anydi/ext/pytest_plugin.py,sha256=Df0pFgAOk-44UFsdZGAOSxElJTJLchs4sk2UZuV-KVk,42
26
26
  anydi/ext/starlette/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  anydi/ext/starlette/middleware.py,sha256=PKip_omFZDgg7h2OY-nnV2OIS1MbbmrrOJBwG7_Peuw,793
28
28
  anydi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
- anydi-0.32.1.dist-info/LICENSE,sha256=V6rU8a8fv6o2jQ-7ODHs0XfDFimot8Q6Km6CylRIDTo,1069
30
- anydi-0.32.1.dist-info/METADATA,sha256=dV2dqhveWtEi-jp5h0QgnOGfY0jN-pAyZLAIoLDKgTI,5112
31
- anydi-0.32.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
32
- anydi-0.32.1.dist-info/entry_points.txt,sha256=GmQblwzxFg42zva1HyBYJJ7TvrTIcSAGBHmyi3bvsi4,42
33
- anydi-0.32.1.dist-info/RECORD,,
29
+ anydi-0.32.2.dist-info/LICENSE,sha256=V6rU8a8fv6o2jQ-7ODHs0XfDFimot8Q6Km6CylRIDTo,1069
30
+ anydi-0.32.2.dist-info/METADATA,sha256=gZZq6SbwsHOAgcT-gx9Y4SoG52zEW6EQPVbmZMCLAH8,5112
31
+ anydi-0.32.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
32
+ anydi-0.32.2.dist-info/entry_points.txt,sha256=GmQblwzxFg42zva1HyBYJJ7TvrTIcSAGBHmyi3bvsi4,42
33
+ anydi-0.32.2.dist-info/RECORD,,
File without changes