argenta 1.0.0a0__py3-none-any.whl → 1.0.0a1__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.
- argenta/command/flag/defaults.py +5 -5
- argenta/router/__init__.py +1 -1
- argenta/router/entity.py +2 -7
- argenta/router/exceptions.py +1 -9
- {argenta-1.0.0a0.dist-info → argenta-1.0.0a1.dist-info}/METADATA +1 -1
- {argenta-1.0.0a0.dist-info → argenta-1.0.0a1.dist-info}/RECORD +8 -8
- {argenta-1.0.0a0.dist-info → argenta-1.0.0a1.dist-info}/WHEEL +0 -0
- {argenta-1.0.0a0.dist-info → argenta-1.0.0a1.dist-info}/licenses/LICENSE +0 -0
argenta/command/flag/defaults.py
CHANGED
@@ -9,16 +9,16 @@ class PredefinedFlags:
|
|
9
9
|
Public. A dataclass with predefined flags and most frequently used flags for quick use
|
10
10
|
"""
|
11
11
|
HELP = Flag(name='help', possible_values=False)
|
12
|
-
SHORT_HELP = Flag(name='
|
12
|
+
SHORT_HELP = Flag(name='H', prefix='-', possible_values=False)
|
13
13
|
|
14
14
|
INFO = Flag(name='info', possible_values=False)
|
15
|
-
SHORT_INFO = Flag(name='
|
15
|
+
SHORT_INFO = Flag(name='I', prefix='-', possible_values=False)
|
16
16
|
|
17
17
|
ALL = Flag(name='all', possible_values=False)
|
18
|
-
SHORT_ALL = Flag(name='
|
18
|
+
SHORT_ALL = Flag(name='A', prefix='-', possible_values=False)
|
19
19
|
|
20
20
|
HOST = Flag(name='host', possible_values=re.compile(r'^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$'))
|
21
|
-
SHORT_HOST = Flag(name='
|
21
|
+
SHORT_HOST = Flag(name='H', prefix='-', possible_values=re.compile(r'^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$'))
|
22
22
|
|
23
23
|
PORT = Flag(name='port', possible_values=re.compile(r'^\d{1,5}$'))
|
24
|
-
SHORT_PORT = Flag(name='
|
24
|
+
SHORT_PORT = Flag(name='P', prefix='-', possible_values=re.compile(r'^\d{1,5}$'))
|
argenta/router/__init__.py
CHANGED
argenta/router/entity.py
CHANGED
@@ -7,7 +7,6 @@ from src.argenta.command.flag.models import Flag, Flags, InputFlags
|
|
7
7
|
from src.argenta.router.exceptions import (RepeatedFlagNameException,
|
8
8
|
TooManyTransferredArgsException,
|
9
9
|
RequiredArgumentNotPassedException,
|
10
|
-
IncorrectNumberOfHandlerArgsException,
|
11
10
|
TriggerContainSpacesException)
|
12
11
|
|
13
12
|
|
@@ -45,17 +44,13 @@ class Router:
|
|
45
44
|
return command_decorator
|
46
45
|
|
47
46
|
|
48
|
-
def set_invalid_input_flag_handler(self, func) -> None:
|
47
|
+
def set_invalid_input_flag_handler(self, func: Callable[[Flag], None]) -> None:
|
49
48
|
"""
|
50
49
|
Public. Registers handler for invalid input flag
|
51
50
|
:param func: registered handler
|
52
51
|
:return: None
|
53
52
|
"""
|
54
|
-
|
55
|
-
if len(processed_args) != 1:
|
56
|
-
raise IncorrectNumberOfHandlerArgsException()
|
57
|
-
else:
|
58
|
-
self._not_valid_flag_handler = func
|
53
|
+
self._not_valid_flag_handler = func
|
59
54
|
|
60
55
|
|
61
56
|
def finds_appropriate_handler(self, input_command: InputCommand) -> None:
|
argenta/router/exceptions.py
CHANGED
@@ -3,7 +3,7 @@ class RepeatedFlagNameException(Exception):
|
|
3
3
|
Private. Raised when a repeated flag name is registered
|
4
4
|
"""
|
5
5
|
def __str__(self):
|
6
|
-
return "Repeated
|
6
|
+
return "Repeated registered flag names in register command"
|
7
7
|
|
8
8
|
|
9
9
|
class TooManyTransferredArgsException(Exception):
|
@@ -22,14 +22,6 @@ class RequiredArgumentNotPassedException(Exception):
|
|
22
22
|
return "Required argument not passed"
|
23
23
|
|
24
24
|
|
25
|
-
class IncorrectNumberOfHandlerArgsException(Exception):
|
26
|
-
"""
|
27
|
-
Private. Raised when incorrect number of arguments are passed
|
28
|
-
"""
|
29
|
-
def __str__(self):
|
30
|
-
return "Handler has incorrect number of arguments"
|
31
|
-
|
32
|
-
|
33
25
|
class TriggerContainSpacesException(Exception):
|
34
26
|
"""
|
35
27
|
Private. Raised when there is a space in the trigger being registered
|
@@ -13,7 +13,7 @@ argenta/command/__init__.py,sha256=Plo2Da0fhq8H1eo2mg7nA1-OBLuGjK2BYpDGRvGGMIU,6
|
|
13
13
|
argenta/command/exceptions.py,sha256=FLX4z7-mvCTRKO7_2_FfJVUbfNLf_Z-vwyZYDy6cnnY,1030
|
14
14
|
argenta/command/models.py,sha256=-CTHYhiBYOUz-XmkNPIxC8-Ma0rb7e1uYwLodQlW4D4,6604
|
15
15
|
argenta/command/flag/__init__.py,sha256=PaZAaqU3DgyO1o5do-xKhWV6TyEuOSaQTmE4VbPY6JA,136
|
16
|
-
argenta/command/flag/defaults.py,sha256=
|
16
|
+
argenta/command/flag/defaults.py,sha256=0wCvh2l3eNU3vTuxuARVaUwhEzG3v9FID0rBbXHyK-k,982
|
17
17
|
argenta/command/flag/models.py,sha256=OYC4yfym1XPvGdtWtRFKJF48SuwZpVU3dalOIplm-zQ,6403
|
18
18
|
argenta/orchestrator/__init__.py,sha256=vFtJEJTjFfoYP3DZx0gNlhoa0Tk8u-yzkGIUN3SiABA,86
|
19
19
|
argenta/orchestrator/entity.py,sha256=HUKhoEQtiWvxeA3QhSkvTcIgwgXDLjmcB2cBFHlCGhw,1101
|
@@ -21,13 +21,13 @@ argenta/orchestrator/argparser/__init__.py,sha256=twfb-FQqW4QUo2XkmMASi654KGiimI
|
|
21
21
|
argenta/orchestrator/argparser/entity.py,sha256=nmwp7dFHTIqLvR9v0n_4j9wvtTowvLK7_SeoyaYL_RM,2145
|
22
22
|
argenta/orchestrator/argparser/arguments/__init__.py,sha256=4T55Tl_4WKOYp9HtVDmzQZylYVKA_cb3XiGoBvAyjNo,318
|
23
23
|
argenta/orchestrator/argparser/arguments/models.py,sha256=hSUXBjTsyzNKvyPgWhiNCa4SSQdmixIQnne2A9iuPMc,1546
|
24
|
-
argenta/router/__init__.py,sha256=
|
24
|
+
argenta/router/__init__.py,sha256=u3nhnT8GOgbWiUmCci5u5xUIuEAt87qNOQc-cv8OTMI,70
|
25
25
|
argenta/router/defaults.py,sha256=RX3DMbZk7XUbj6uR4uADhZOPqEDoeCz9X-n26YTCCPM,87
|
26
|
-
argenta/router/entity.py,sha256=
|
27
|
-
argenta/router/exceptions.py,sha256=
|
26
|
+
argenta/router/entity.py,sha256=_VKcmvcPixlxqJIKsrH_KbirrtPdRIvUVtdFoEmdZ3Y,7997
|
27
|
+
argenta/router/exceptions.py,sha256=q6y-4gmbgkX-0U4-qXHDP5HTtUQ_c4svaqVILn-ZzRw,852
|
28
28
|
argenta/router/command_handler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
29
|
argenta/router/command_handler/entity.py,sha256=87H1jGO6O_udWDAmvfGDjpkeFCCHdbsTPnJ94r6_r70,2817
|
30
|
-
argenta-1.0.
|
31
|
-
argenta-1.0.
|
32
|
-
argenta-1.0.
|
33
|
-
argenta-1.0.
|
30
|
+
argenta-1.0.0a1.dist-info/METADATA,sha256=29ZmEBlbu1qkMgPekut1H5jn63J3hd3iXVQERyBJWSw,27366
|
31
|
+
argenta-1.0.0a1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
32
|
+
argenta-1.0.0a1.dist-info/licenses/LICENSE,sha256=zmqoGh2n5rReBv4s8wPxF_gZEZDgauJYSPMuPczgOiU,1082
|
33
|
+
argenta-1.0.0a1.dist-info/RECORD,,
|
File without changes
|
File without changes
|