ref: typehints, enum instead of raw string, abc and other (#1)

Full code coverage with annotations, fixing errors in various linters: ruff, wps, etc. Fixing errors in type checkers: ty, mypy, pyright. Formatting and bringing code to a consistent style, applying best practices in various aspects.
This commit is contained in:
kolo
2025-10-08 13:37:31 +03:00
committed by GitHub
parent 22f1171192
commit 73303b1c08
45 changed files with 983 additions and 996 deletions
+4 -7
View File
@@ -11,12 +11,9 @@ class Orchestrator:
:param arg_parser: Cmd argument parser and configurator at startup
:return: None
"""
self.arg_parser: ArgParser | None = arg_parser
if arg_parser:
self.arg_parser.register_args()
self._arg_parser: ArgParser | None = arg_parser
@staticmethod
def start_polling(app: App) -> None:
def start_polling(self, app: App) -> None:
"""
Public. Starting the user input processing cycle
:param app: a running application
@@ -29,7 +26,7 @@ class Orchestrator:
Public. Returns the arguments parsed
:return: None
"""
if self.arg_parser:
return self.arg_parser.entity.parse_args()
if self._arg_parser:
return self._arg_parser.parse_args()
else:
return None