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 CHANGED
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.7.0"
8
+ VERSION = "0.8.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -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
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: Orionis Framework – Elegant, Fast, and Powerful.
5
5
  Home-page: https://github.com/orionis-framework/framework
6
6
  Author: Raul Mauricio Uñate Castro
@@ -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=ZiVoL5HQ9nx6oZijIDIPxNNieVtsLT7l2r2Q9zeeBA0,1385
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=Tw_Kibld2dKSomXKQCH-_jn_vAHLXWkbBHRjeSgdwC4,11445
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.7.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
137
- orionis-0.7.0.dist-info/METADATA,sha256=-wJ-IuY4pOizRCsgyAqcGYLO_fMqeWzuQJkixy4lI1o,2977
138
- orionis-0.7.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
139
- orionis-0.7.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
140
- orionis-0.7.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
141
- orionis-0.7.0.dist-info/RECORD,,
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,,