orionis 0.7.0__py3-none-any.whl → 0.8.0__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.
- orionis/framework.py +1 -1
- orionis/luminate/container/container.py +9 -0
- {orionis-0.7.0.dist-info → orionis-0.8.0.dist-info}/METADATA +1 -1
- {orionis-0.7.0.dist-info → orionis-0.8.0.dist-info}/RECORD +8 -8
- {orionis-0.7.0.dist-info → orionis-0.8.0.dist-info}/LICENCE +0 -0
- {orionis-0.7.0.dist-info → orionis-0.8.0.dist-info}/WHEEL +0 -0
- {orionis-0.7.0.dist-info → orionis-0.8.0.dist-info}/entry_points.txt +0 -0
- {orionis-0.7.0.dist-info → orionis-0.8.0.dist-info}/top_level.txt +0 -0
orionis/framework.py
CHANGED
@@ -236,15 +236,24 @@ class Container:
|
|
236
236
|
if len(parameters) == 0 or (len(parameters) == 1 and "self" in parameters):
|
237
237
|
return concrete()
|
238
238
|
|
239
|
+
# Resolve the dependencies of the class constructor
|
239
240
|
dependencies = {}
|
240
241
|
for name, param in parameters.items():
|
241
242
|
if name == "self" or param.kind in (param.VAR_POSITIONAL, param.VAR_KEYWORD):
|
242
243
|
continue
|
243
244
|
|
245
|
+
# If the parameter has a default value, use it directly
|
244
246
|
param_type = param.annotation
|
247
|
+
|
248
|
+
# If the parameter type is not specified, try to resolve it by name
|
245
249
|
if param_type == param.empty:
|
250
|
+
if param.default != param.empty:
|
251
|
+
# Use the default value if available
|
252
|
+
continue
|
253
|
+
|
246
254
|
raise OrionisContainerValueError(f"Parameter type {name} not specified in {concrete.__name__}")
|
247
255
|
|
256
|
+
# If the parameter type is a primitive, use it directly
|
248
257
|
dep_name = param_type.__name__
|
249
258
|
|
250
259
|
# Conditional resolution of dependencies, if registered
|
@@ -1,6 +1,6 @@
|
|
1
1
|
orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
orionis/cli_manager.py,sha256=9wNVJxB0HyqUbNesUvkwlsqTyUbZwK6R46iVLE5WVBQ,1715
|
3
|
-
orionis/framework.py,sha256=
|
3
|
+
orionis/framework.py,sha256=CEi3liwMhRLMtbWS1D620sNyY-diMjBMT76cc4qflTs,1385
|
4
4
|
orionis/luminate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
orionis/luminate/app.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
orionis/luminate/bootstrap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -52,7 +52,7 @@ orionis/luminate/console/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
52
52
|
orionis/luminate/console/scripts/management.py,sha256=KT6Bg8kyuUw63SNAtZo6tLH6syOEkxM9J70tCpKgrUw,2860
|
53
53
|
orionis/luminate/console/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
54
54
|
orionis/luminate/console/tasks/scheduler.py,sha256=h3fRVTx6TuZVcY7zZ6oOzGDnlDAWaRwkj92pFTGUm6E,22686
|
55
|
-
orionis/luminate/container/container.py,sha256=
|
55
|
+
orionis/luminate/container/container.py,sha256=tTfQCiCklrXd9IrddQaFe06aYISmzsqtlxGdDJqq_a8,11895
|
56
56
|
orionis/luminate/container/exception.py,sha256=Tf7KdfbEtr0YldhZ1WrKfkBlI5W_KvZO61xWAGFdF0A,1156
|
57
57
|
orionis/luminate/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
58
58
|
orionis/luminate/contracts/bootstrap/parser_interface.py,sha256=7DLnp7yB7edayVkSm-piTi8JSf0QKaYYI82qDZudgM0,1641
|
@@ -133,9 +133,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
133
133
|
tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
134
134
|
tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
|
135
135
|
tests/tools/test_reflection.py,sha256=dNN5p_xAosyEf0ddAElmmmTfhcTtBd4zBNl7qzgnsc0,5242
|
136
|
-
orionis-0.
|
137
|
-
orionis-0.
|
138
|
-
orionis-0.
|
139
|
-
orionis-0.
|
140
|
-
orionis-0.
|
141
|
-
orionis-0.
|
136
|
+
orionis-0.8.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
137
|
+
orionis-0.8.0.dist-info/METADATA,sha256=StBcKEsfGMocKsyEbUsAiI68lKXTE46-jwJrF9rFPlw,2977
|
138
|
+
orionis-0.8.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
139
|
+
orionis-0.8.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
|
140
|
+
orionis-0.8.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
141
|
+
orionis-0.8.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|