argenta 1.0.3__tar.gz → 1.0.5__tar.gz
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-1.0.3 → argenta-1.0.5}/PKG-INFO +11 -9
- argenta-1.0.5/README.de.md +66 -0
- argenta-1.0.5/README.md +68 -0
- argenta-1.0.5/mock/local_test.py +32 -0
- {argenta-1.0.3 → argenta-1.0.5}/mock/mock_app/main.py +1 -1
- {argenta-1.0.3/mock/mock_app/handlers → argenta-1.0.5/mock/mock_app}/routers.py +1 -1
- {argenta-1.0.3 → argenta-1.0.5}/pyproject.toml +1 -1
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/app/defaults.py +2 -2
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/app/models.py +3 -6
- argenta-1.0.5/src/argenta/command/flag/__init__.py +7 -0
- {argenta-1.0.3/src/argenta/command → argenta-1.0.5/src/argenta/command/flag}/flags/__init__.py +1 -1
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/command/models.py +1 -1
- argenta-1.0.5/src/argenta/metrics/__init__.py +4 -0
- argenta-1.0.5/src/argenta/metrics/main.py +26 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/response/entity.py +1 -1
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/router/entity.py +1 -1
- argenta-1.0.3/mock/default_mock_app/main.py +0 -27
- argenta-1.0.3/mock/local_test.py +0 -89
- argenta-1.0.3/mock/mock_app/handlers/handlers_implementation/help_command.py +0 -12
- argenta-1.0.3/src/argenta/command/flag/__init__.py +0 -4
- argenta-1.0.3/tests/__init__.py +0 -0
- argenta-1.0.3/tests/system_tests/__init__.py +0 -0
- argenta-1.0.3/tests/unit_tests/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/.github/workflows/ruff.yml +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/.github/workflows/tests.yml +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/.gitignore +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/LICENSE +0 -0
- /argenta-1.0.3/README.md → /argenta-1.0.5/README.ru.md +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/imgs/argenta_banner.png +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/imgs/argenta_logo.png +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/imgs/argenta_logo_strip.png +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/imgs/argenta_logo_strip.svg +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/imgs/mock_app_preview1.png +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/imgs/mock_app_preview2.png +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/imgs/mock_app_preview3.png +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/imgs/mock_app_preview4.png +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/mock/__init__.py +0 -0
- {argenta-1.0.3/mock/default_mock_app → argenta-1.0.5/mock/mock_app}/__init__.py +0 -0
- {argenta-1.0.3/mock/mock_app → argenta-1.0.5/src}/__init__.py +0 -0
- {argenta-1.0.3/mock/mock_app/handlers → argenta-1.0.5/src/argenta}/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/app/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/app/autocompleter/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/app/autocompleter/entity.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/app/dividing_line/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/app/dividing_line/models.py +0 -0
- {argenta-1.0.3/mock/mock_app/handlers/handlers_implementation → argenta-1.0.5/src/argenta/app/registered_routers}/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/app/registered_routers/entity.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/command/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/command/exceptions.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/command/flag/defaults.py +0 -0
- {argenta-1.0.3/src/argenta/command → argenta-1.0.5/src/argenta/command/flag}/flags/models.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/command/flag/models.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/orchestrator/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/orchestrator/argparser/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/orchestrator/argparser/arguments/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/orchestrator/argparser/arguments/models.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/orchestrator/argparser/entity.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/orchestrator/entity.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/response/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/response/status.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/router/__init__.py +0 -0
- {argenta-1.0.3/src → argenta-1.0.5/src/argenta/router/command_handler}/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/router/command_handler/entity.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/router/defaults.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/src/argenta/router/exceptions.py +0 -0
- {argenta-1.0.3/src/argenta → argenta-1.0.5/tests}/__init__.py +0 -0
- {argenta-1.0.3/src/argenta/app/registered_routers → argenta-1.0.5/tests/system_tests}/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/tests/system_tests/test_system_handling_non_standard_behavior.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/tests/system_tests/test_system_handling_normal_behavior.py +0 -0
- {argenta-1.0.3/src/argenta/router/command_handler → argenta-1.0.5/tests/unit_tests}/__init__.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/tests/unit_tests/test_app.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/tests/unit_tests/test_command.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/tests/unit_tests/test_dividing_line.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/tests/unit_tests/test_flag.py +0 -0
- {argenta-1.0.3 → argenta-1.0.5}/tests/unit_tests/test_router.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: argenta
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.5
|
4
4
|
Summary: Python library for building modular CLI applications
|
5
5
|
Author-email: kolo <kolo.is.main@gmail.com>
|
6
6
|
License: MIT
|
@@ -13,13 +13,15 @@ Description-Content-Type: text/markdown
|
|
13
13
|
|
14
14
|
# Argenta
|
15
15
|
|
16
|
-
###
|
16
|
+
### Library for creating modular CLI applications
|
17
|
+
|
18
|
+
#### RU - [README.ru.md](https://github.com/koloideal/Argenta/blob/kolo/README.ru.md) • DE - [README.de.md](https://github.com/koloideal/Argenta/blob/kolo/README.de.md)
|
17
19
|
|
18
20
|

|
19
21
|
|
20
22
|
---
|
21
23
|
|
22
|
-
#
|
24
|
+
# Installing
|
23
25
|
```bash
|
24
26
|
pip install argenta
|
25
27
|
```
|
@@ -30,9 +32,9 @@ poetry add argenta
|
|
30
32
|
|
31
33
|
---
|
32
34
|
|
33
|
-
#
|
35
|
+
# Quick start
|
34
36
|
|
35
|
-
|
37
|
+
An example of a simple application
|
36
38
|
```python
|
37
39
|
# routers.py
|
38
40
|
from argenta.router import Router
|
@@ -68,12 +70,12 @@ if __name__ == '__main__':
|
|
68
70
|
|
69
71
|
---
|
70
72
|
|
71
|
-
#
|
73
|
+
# Features in development
|
72
74
|
|
73
|
-
-
|
74
|
-
-
|
75
|
+
- Full support for autocompleter on Linux
|
76
|
+
- Ability to configure stdout capture when handling input by the handler
|
75
77
|
|
76
|
-
##
|
78
|
+
## Full [docs](https://argenta-docs.vercel.app) | MIT 2025 kolo | made by [kolo](https://t.me/kolo_id)
|
77
79
|
|
78
80
|
|
79
81
|
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Argenta
|
2
|
+
|
3
|
+
### Bibliothek zum Erstellen modularer CLI-Anwendungen
|
4
|
+
|
5
|
+

|
6
|
+
|
7
|
+
---
|
8
|
+
|
9
|
+
# Installation
|
10
|
+
```bash
|
11
|
+
pip install argenta
|
12
|
+
```
|
13
|
+
or
|
14
|
+
```bash
|
15
|
+
poetry add argenta
|
16
|
+
```
|
17
|
+
|
18
|
+
---
|
19
|
+
|
20
|
+
# Schnellstart
|
21
|
+
|
22
|
+
Ein Beispiel für eine einfache Anwendung
|
23
|
+
```python
|
24
|
+
# routers.py
|
25
|
+
from argenta.router import Router
|
26
|
+
from argenta.command import Command
|
27
|
+
from argenta.response import Response
|
28
|
+
|
29
|
+
|
30
|
+
router = Router()
|
31
|
+
|
32
|
+
@router.command(Command("hello"))
|
33
|
+
def handler(response: Response):
|
34
|
+
print("Hello, world!")
|
35
|
+
```
|
36
|
+
|
37
|
+
```python
|
38
|
+
# main.py
|
39
|
+
from argenta.app import App
|
40
|
+
from argenta.orchestrator import Orchestrator
|
41
|
+
from routers import router
|
42
|
+
|
43
|
+
app: App = App()
|
44
|
+
orchestrator: Orchestrator = Orchestrator()
|
45
|
+
|
46
|
+
|
47
|
+
def main() -> None:
|
48
|
+
app.include_router(router)
|
49
|
+
orchestrator.start_polling(app)
|
50
|
+
|
51
|
+
|
52
|
+
if __name__ == '__main__':
|
53
|
+
main()
|
54
|
+
```
|
55
|
+
|
56
|
+
---
|
57
|
+
|
58
|
+
# Funktionen in der Entwicklung
|
59
|
+
|
60
|
+
- Vollständige Unterstützung für Autocompleter unter Linux
|
61
|
+
- Möglichkeit zur Konfiguration der Standardausgabeerfassung bei der Verarbeitung von Eingaben durch den Handler
|
62
|
+
|
63
|
+
## Vollständige [Dokumentation](https://argenta-docs.vercel.app) | MIT 2025 kolo | made by [kolo](https://t.me/kolo_id)
|
64
|
+
|
65
|
+
|
66
|
+
|
argenta-1.0.5/README.md
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
# Argenta
|
2
|
+
|
3
|
+
### Library for creating modular CLI applications
|
4
|
+
|
5
|
+
#### RU - [README.ru.md](https://github.com/koloideal/Argenta/blob/kolo/README.ru.md) • DE - [README.de.md](https://github.com/koloideal/Argenta/blob/kolo/README.de.md)
|
6
|
+
|
7
|
+

|
8
|
+
|
9
|
+
---
|
10
|
+
|
11
|
+
# Installing
|
12
|
+
```bash
|
13
|
+
pip install argenta
|
14
|
+
```
|
15
|
+
or
|
16
|
+
```bash
|
17
|
+
poetry add argenta
|
18
|
+
```
|
19
|
+
|
20
|
+
---
|
21
|
+
|
22
|
+
# Quick start
|
23
|
+
|
24
|
+
An example of a simple application
|
25
|
+
```python
|
26
|
+
# routers.py
|
27
|
+
from argenta.router import Router
|
28
|
+
from argenta.command import Command
|
29
|
+
from argenta.response import Response
|
30
|
+
|
31
|
+
|
32
|
+
router = Router()
|
33
|
+
|
34
|
+
@router.command(Command("hello"))
|
35
|
+
def handler(response: Response):
|
36
|
+
print("Hello, world!")
|
37
|
+
```
|
38
|
+
|
39
|
+
```python
|
40
|
+
# main.py
|
41
|
+
from argenta.app import App
|
42
|
+
from argenta.orchestrator import Orchestrator
|
43
|
+
from routers import router
|
44
|
+
|
45
|
+
app: App = App()
|
46
|
+
orchestrator: Orchestrator = Orchestrator()
|
47
|
+
|
48
|
+
|
49
|
+
def main() -> None:
|
50
|
+
app.include_router(router)
|
51
|
+
orchestrator.start_polling(app)
|
52
|
+
|
53
|
+
|
54
|
+
if __name__ == '__main__':
|
55
|
+
main()
|
56
|
+
```
|
57
|
+
|
58
|
+
---
|
59
|
+
|
60
|
+
# Features in development
|
61
|
+
|
62
|
+
- Full support for autocompleter on Linux
|
63
|
+
- Ability to configure stdout capture when handling input by the handler
|
64
|
+
|
65
|
+
## Full [docs](https://argenta-docs.vercel.app) | MIT 2025 kolo | made by [kolo](https://t.me/kolo_id)
|
66
|
+
|
67
|
+
|
68
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
from argenta.router import Router
|
2
|
+
from argenta.command import Command
|
3
|
+
from argenta.response import Response
|
4
|
+
from argenta.metrics import get_time_of_pre_cycle_setup
|
5
|
+
from argenta.response.status import Status
|
6
|
+
from argenta.command.flag import Flag, Flags
|
7
|
+
from argenta.app import App
|
8
|
+
from argenta.orchestrator import Orchestrator
|
9
|
+
|
10
|
+
|
11
|
+
router = Router()
|
12
|
+
|
13
|
+
for i in range(10000):
|
14
|
+
trigger = f"cmd{i}"
|
15
|
+
|
16
|
+
@router.command(Command(trigger, aliases=[f'dfs{i}', f'fds{i}']))
|
17
|
+
def handler(response: Response):
|
18
|
+
print(response.status)
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
app = App(repeat_command_groups=False)
|
23
|
+
app.include_router(router)
|
24
|
+
|
25
|
+
print(get_time_of_pre_cycle_setup(app))
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
@@ -2,7 +2,7 @@ from rich.console import Console
|
|
2
2
|
|
3
3
|
from argenta.command import Command
|
4
4
|
from argenta.command.flag.defaults import PredefinedFlags
|
5
|
-
from argenta.command.
|
5
|
+
from argenta.command.flag import Flags
|
6
6
|
from argenta.response import Response
|
7
7
|
from argenta.router import Router
|
8
8
|
|
@@ -201,9 +201,7 @@ class BaseApp:
|
|
201
201
|
return False
|
202
202
|
return True
|
203
203
|
|
204
|
-
def _error_handler(
|
205
|
-
self, error: BaseInputCommandException, raw_command: str
|
206
|
-
) -> None:
|
204
|
+
def _error_handler(self, error: BaseInputCommandException, raw_command: str) -> None:
|
207
205
|
"""
|
208
206
|
Private. Handles parsing errors of the entered command
|
209
207
|
:param error: error being handled
|
@@ -296,7 +294,7 @@ class BaseApp:
|
|
296
294
|
|
297
295
|
self._unknown_command_handler = unknown_command_handler
|
298
296
|
|
299
|
-
def
|
297
|
+
def pre_cycle_setup(self) -> None:
|
300
298
|
"""
|
301
299
|
Private. Configures various aspects of the application before the start of the cycle
|
302
300
|
:return: None
|
@@ -330,7 +328,6 @@ class BaseApp:
|
|
330
328
|
self._print_func(message)
|
331
329
|
if self._messages_on_startup:
|
332
330
|
print("\n")
|
333
|
-
|
334
331
|
if not self._repeat_command_groups_description:
|
335
332
|
self._print_command_group_description()
|
336
333
|
|
@@ -381,7 +378,7 @@ class App(BaseApp):
|
|
381
378
|
Private. Starts the user input processing cycle
|
382
379
|
:return: None
|
383
380
|
"""
|
384
|
-
self.
|
381
|
+
self.pre_cycle_setup()
|
385
382
|
while True:
|
386
383
|
if self._repeat_command_groups_description:
|
387
384
|
self._print_command_group_description()
|
@@ -0,0 +1,7 @@
|
|
1
|
+
__all__ = ["Flag", "InputFlag", "UndefinedInputFlags", "ValidInputFlags", "InvalidValueInputFlags", "Flags"]
|
2
|
+
|
3
|
+
|
4
|
+
from argenta.command.flag.models import Flag, InputFlag
|
5
|
+
from argenta.command.flag.flags.models import (UndefinedInputFlags,
|
6
|
+
ValidInputFlags, Flags,
|
7
|
+
InvalidValueInputFlags)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from argenta.command.flag.models import Flag, InputFlag
|
2
|
-
from argenta.command.flags.models import InputFlags, Flags
|
2
|
+
from argenta.command.flag.flags.models import InputFlags, Flags
|
3
3
|
from argenta.command.exceptions import (
|
4
4
|
UnprocessedInputFlagException,
|
5
5
|
RepeatedInputFlagsException,
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import io
|
2
|
+
from contextlib import redirect_stdout
|
3
|
+
from time import time
|
4
|
+
|
5
|
+
from argenta.router import Router
|
6
|
+
from argenta.command import Command
|
7
|
+
from argenta.response import Response
|
8
|
+
from argenta.response.status import Status
|
9
|
+
from argenta.command.flag import Flag, Flags
|
10
|
+
from argenta.app import App
|
11
|
+
|
12
|
+
|
13
|
+
def get_time_of_pre_cycle_setup(app: App) -> float:
|
14
|
+
start = time()
|
15
|
+
with redirect_stdout(io.StringIO()):
|
16
|
+
app.pre_cycle_setup()
|
17
|
+
end = time()
|
18
|
+
return end - start
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
@@ -6,7 +6,7 @@ from argenta.command import Command
|
|
6
6
|
from argenta.command.models import InputCommand
|
7
7
|
from argenta.response import Response, Status
|
8
8
|
from argenta.router.command_handler.entity import CommandHandlers, CommandHandler
|
9
|
-
from argenta.command.flags
|
9
|
+
from argenta.command.flag.flags import (
|
10
10
|
Flags,
|
11
11
|
InputFlags,
|
12
12
|
UndefinedInputFlags,
|
@@ -1,27 +0,0 @@
|
|
1
|
-
from mock.mock_app.handlers.routers import work_router
|
2
|
-
|
3
|
-
from argenta.app import App
|
4
|
-
from argenta.app.defaults import PredefinedMessages
|
5
|
-
from argenta.app.autocompleter import AutoCompleter
|
6
|
-
from argenta.orchestrator import Orchestrator
|
7
|
-
from argenta.orchestrator.argparser import ArgParser
|
8
|
-
from argenta.orchestrator.argparser.arguments import BooleanArgument
|
9
|
-
|
10
|
-
|
11
|
-
arg_parser = ArgParser(processed_args=[BooleanArgument("repeat")])
|
12
|
-
app: App = App(autocompleter=AutoCompleter(".hist"))
|
13
|
-
orchestrator: Orchestrator = Orchestrator()
|
14
|
-
|
15
|
-
|
16
|
-
def main():
|
17
|
-
app.include_router(work_router)
|
18
|
-
|
19
|
-
app.add_message_on_startup(PredefinedMessages.USAGE)
|
20
|
-
app.add_message_on_startup(PredefinedMessages.AUTOCOMPLETE)
|
21
|
-
app.add_message_on_startup(PredefinedMessages.HELP)
|
22
|
-
|
23
|
-
orchestrator.start_polling(app)
|
24
|
-
|
25
|
-
|
26
|
-
if __name__ == "__main__":
|
27
|
-
main()
|
argenta-1.0.3/mock/local_test.py
DELETED
@@ -1,89 +0,0 @@
|
|
1
|
-
from argenta.router import Router
|
2
|
-
from argenta.command import Command
|
3
|
-
from argenta.response import Response
|
4
|
-
from argenta.response.status import Status
|
5
|
-
from argenta.command.flag import Flag
|
6
|
-
from argenta.command.flags import Flags
|
7
|
-
from argenta.app import App
|
8
|
-
from argenta.orchestrator import Orchestrator
|
9
|
-
|
10
|
-
# Создание маршрутизатора
|
11
|
-
file_router = Router("Операции с файлами")
|
12
|
-
|
13
|
-
# Определение флагов для команды копирования
|
14
|
-
copy_flags = Flags(
|
15
|
-
Flag('source', '--'),
|
16
|
-
Flag('destination', '--'),
|
17
|
-
Flag('recursive', '--', False), # Булевый флаг без значения
|
18
|
-
Flag('force', '-', False) # Короткий булевый флаг
|
19
|
-
)
|
20
|
-
@file_router.command(Command('case', aliases=['cp', 'ch']))
|
21
|
-
def handler(response: Response):
|
22
|
-
print('test')
|
23
|
-
|
24
|
-
# Регистрация команды копирования
|
25
|
-
@file_router.command(Command(
|
26
|
-
trigger="ch",
|
27
|
-
description="Копирование файлов",
|
28
|
-
flags=copy_flags,
|
29
|
-
aliases=["cp"]
|
30
|
-
))
|
31
|
-
def copy_files(response: Response):
|
32
|
-
# Получаем значения корректных флагов
|
33
|
-
source = None
|
34
|
-
destination = None
|
35
|
-
recursive = False
|
36
|
-
force = False
|
37
|
-
|
38
|
-
for flag in response.valid_flags:
|
39
|
-
if flag.get_name() == "source":
|
40
|
-
source = flag.get_value()
|
41
|
-
elif flag.get_name() == "destination":
|
42
|
-
destination = flag.get_value()
|
43
|
-
elif flag.get_name() == "recursive":
|
44
|
-
recursive = True
|
45
|
-
elif flag.get_name() == "force":
|
46
|
-
force = True
|
47
|
-
|
48
|
-
# Проверка обязательных параметров
|
49
|
-
if not source or not destination:
|
50
|
-
print("Ошибка: необходимо указать источник и назначение")
|
51
|
-
return
|
52
|
-
|
53
|
-
print(f"Копирование из {source} в {destination}")
|
54
|
-
if recursive:
|
55
|
-
print("Рекурсивное копирование включено")
|
56
|
-
if force:
|
57
|
-
print("Принудительное копирование включено")
|
58
|
-
|
59
|
-
# Обработка неопределенных флагов
|
60
|
-
if response.undefined_flags:
|
61
|
-
print("\nПредупреждение: обнаружены незарегистрированные флаги:")
|
62
|
-
for flag in response.undefined_flags:
|
63
|
-
print(f" - {flag.get_name()}" +
|
64
|
-
(f" = {flag.get_value()}" if flag.get_value() else ""))
|
65
|
-
|
66
|
-
# Обработка флагов с некорректными значениями
|
67
|
-
if response.invalid_value_flags:
|
68
|
-
print("\nПредупреждение: обнаружены флаги с некорректными значениями:")
|
69
|
-
for flag in response.invalid_value_flags:
|
70
|
-
print(f" - {flag.get_name()} = {flag.get_value()}")
|
71
|
-
|
72
|
-
# Принятие решения на основе статуса
|
73
|
-
if response.status != Status.ALL_FLAGS_VALID:
|
74
|
-
print("\nВыполнение с предупреждениями из-за проблем с флагами.")
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
app = App()
|
79
|
-
app.include_router(file_router)
|
80
|
-
orchestrator = Orchestrator()
|
81
|
-
|
82
|
-
orchestrator.start_polling(app)
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
from rich.console import Console
|
2
|
-
|
3
|
-
|
4
|
-
console = Console()
|
5
|
-
|
6
|
-
|
7
|
-
def help_command():
|
8
|
-
console.print(
|
9
|
-
"[italic bold]The main functionality of the script is to convert an expression from a string "
|
10
|
-
"to a mathematical one and then calculate this expression. "
|
11
|
-
"Project GitHub: https://github.com/koloideal/WordMath[/italic bold]"
|
12
|
-
)
|
argenta-1.0.3/tests/__init__.py
DELETED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{argenta-1.0.3/src/argenta/command → argenta-1.0.5/src/argenta/command/flag}/flags/models.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{argenta-1.0.3/src/argenta/app/registered_routers → argenta-1.0.5/tests/system_tests}/__init__.py
RENAMED
File without changes
|
{argenta-1.0.3 → argenta-1.0.5}/tests/system_tests/test_system_handling_non_standard_behavior.py
RENAMED
File without changes
|
File without changes
|
{argenta-1.0.3/src/argenta/router/command_handler → argenta-1.0.5/tests/unit_tests}/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|