orionis 0.671.0__py3-none-any.whl → 0.672.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.
@@ -565,51 +565,58 @@ class Reactor(IReactor):
565
565
  If the 'options' method does not return a list or contains non-CLIArgument instances.
566
566
  """
567
567
 
568
- # Instantiate the command and retrieve its options
569
- instance = self.__app.make(obj)
570
- options: List[CLIArgument] = self.__app.call(instance, 'options')
571
-
572
- # Validate that options is a list
573
- if not isinstance(options, list):
574
- raise CLIOrionisTypeError(
575
- f"Command class {obj.__name__} 'options' must return a list."
576
- )
568
+ try:
577
569
 
578
- # Return None if there are no arguments
579
- if not options:
580
- return None
570
+ # Instantiate the command and retrieve its options
571
+ instance = self.__app.make(obj)
572
+ options: List[CLIArgument] = self.__app.call(instance, 'options')
581
573
 
582
- # Validate all items are CLIArgument instances
583
- for idx, arg in enumerate(options):
584
- if not isinstance(arg, CLIArgument):
574
+ # Validate that options is a list
575
+ if not isinstance(options, list):
585
576
  raise CLIOrionisTypeError(
586
- f"Command class {obj.__name__} 'options' must contain only CLIArgument instances, "
587
- f"found '{type(arg).__name__}' at index {idx}."
577
+ f"Command class {obj.__name__} 'options' must return a list."
588
578
  )
589
579
 
580
+ # Return None if there are no arguments
581
+ if not options:
582
+ return None
583
+
584
+ # Validate all items are CLIArgument instances
585
+ for idx, arg in enumerate(options):
586
+ if not isinstance(arg, CLIArgument):
587
+ raise CLIOrionisTypeError(
588
+ f"Command class {obj.__name__} 'options' must contain only CLIArgument instances, "
589
+ f"found '{type(arg).__name__}' at index {idx}."
590
+ )
591
+
592
+
593
+ # Get the Signature attribute from the command class
594
+ rf_concrete = ReflectionConcrete(obj)
595
+ signature = rf_concrete.getAttribute('signature', '<unknown>')
596
+ description = rf_concrete.getAttribute('description', '')
597
+
598
+ # Build the ArgumentParser
599
+ arg_parser = argparse.ArgumentParser(
600
+ usage=f"python -B reactor {signature} [options]",
601
+ description=f"Command [{signature}] : {description}",
602
+ formatter_class=argparse.RawTextHelpFormatter,
603
+ add_help=True,
604
+ allow_abbrev=False,
605
+ exit_on_error=True,
606
+ prog=signature
607
+ )
608
+
609
+ # Add each CLIArgument to the ArgumentParser
610
+ for arg in options:
611
+ arg.addToParser(arg_parser)
590
612
 
591
- # Get the Signature attribute from the command class
592
- rf_concrete = ReflectionConcrete(obj)
593
- signature = rf_concrete.getAttribute('signature', '<unknown>')
594
- description = rf_concrete.getAttribute('description', '')
595
-
596
- # Build the ArgumentParser
597
- arg_parser = argparse.ArgumentParser(
598
- usage=f"python -B reactor {signature} [options]",
599
- description=f"Command [{signature}] : {description}",
600
- formatter_class=argparse.RawTextHelpFormatter,
601
- add_help=True,
602
- allow_abbrev=False,
603
- exit_on_error=True,
604
- prog=signature
605
- )
613
+ # Return the constructed ArgumentParser
614
+ return arg_parser
606
615
 
607
- # Add each CLIArgument to the ArgumentParser
608
- for arg in options:
609
- arg.addToParser(arg_parser)
616
+ except Exception as e:
610
617
 
611
- # Return the constructed ArgumentParser
612
- return arg_parser
618
+ # Raise a runtime error if any exception occurs during argument processing
619
+ raise CLIOrionisRuntimeError(e) from e
613
620
 
614
621
  def __parseArgs(
615
622
  self,
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.671.0"
8
+ VERSION = "0.672.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.671.0
3
+ Version: 0.672.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
@@ -32,7 +32,7 @@ orionis/console/contracts/reactor.py,sha256=iT6ShoCutAWEeJzOf_PK7CGXi9TgrOD5tewH
32
32
  orionis/console/contracts/schedule.py,sha256=xtXgp4BPhvhg3YSM4mrIdbyoBdr4OJBi1gBM_kJN5UQ,13694
33
33
  orionis/console/contracts/schedule_event_listener.py,sha256=h06qsBxuEMD3KLSyu0JXdUDHlQW19BX9lA09Qrh2QXg,3818
34
34
  orionis/console/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
- orionis/console/core/reactor.py,sha256=ZIiov3nKrONu_QjY61tj-vNOO082GBwoA7MTXcmQif0,43946
35
+ orionis/console/core/reactor.py,sha256=qctLns-f5eB9Air7Qi4hvX5KB5A7SsHeV8M5zYJEiPA,44286
36
36
  orionis/console/debug/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  orionis/console/debug/dumper.py,sha256=vbmP_GlrzBj0KDjiQl4iDudPRe6V0W5r5UA8i3h9_c4,6555
38
38
  orionis/console/dynamic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -206,7 +206,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=IrPQJwvQVLRm5Qnz0Cxon4
206
206
  orionis/foundation/providers/testing_provider.py,sha256=eI1p2lUlxl25b5Z487O4nmqLE31CTDb4c3Q21xFadkE,1615
207
207
  orionis/foundation/providers/workers_provider.py,sha256=GdHENYV_yGyqmHJHn0DCyWmWId5xWjD48e6Zq2PGCWY,1674
208
208
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
209
- orionis/metadata/framework.py,sha256=JYRLl0MA62Nx9yAUFTnJjSyPkz_KUw1AVvTBzfuao-k,4089
209
+ orionis/metadata/framework.py,sha256=eMXy0dxPBfl1IqUyX23hng2Vfk04cmMg_2HHsZLCr5M,4089
210
210
  orionis/metadata/package.py,sha256=s1JeGJPwdVh4jO3IOfmpwMuJ_oX6Vf9NL7jgPEQNf5Y,16050
211
211
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
212
212
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -393,8 +393,8 @@ orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnI
393
393
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
394
394
  orionis/test/view/render.py,sha256=arysoswhkV2vUd2aVMZRPpmH317jaWbgjDpQ_AWQ5AE,5663
395
395
  orionis/test/view/report.stub,sha256=QLqqCdRoENr3ECiritRB3DO_MOjRQvgBh5jxZ3Hs1r0,28189
396
- orionis-0.671.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
397
- orionis-0.671.0.dist-info/METADATA,sha256=gXH_KdM2Ir4wyE-b-TI1Vj14qFb1j63WWeSrHmxqkIw,4772
398
- orionis-0.671.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
399
- orionis-0.671.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
400
- orionis-0.671.0.dist-info/RECORD,,
396
+ orionis-0.672.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
397
+ orionis-0.672.0.dist-info/METADATA,sha256=pzALGHPw_H9_MsP7awPsyS8yrki6VRqbJHt5QjnuTwU,4772
398
+ orionis-0.672.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
399
+ orionis-0.672.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
400
+ orionis-0.672.0.dist-info/RECORD,,