mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
imports sort
This commit is contained in:
@@ -35,6 +35,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"isort>=7.0.0",
|
||||
"mypy>=1.14.1",
|
||||
"pytest>=8.3.2",
|
||||
"ruff>=0.12.12",
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
from argenta.orchestrator.entity import Orchestrator as Orchestrator
|
||||
from argenta.app.models import App as App
|
||||
from argenta.orchestrator.entity import Orchestrator as Orchestrator
|
||||
from argenta.router.entity import Router as Router
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
from argenta.app.models import App as App
|
||||
from argenta.app.defaults import PredefinedMessages as PredefinedMessages
|
||||
from argenta.app.dividing_line.models import DynamicDividingLine as DynamicDividingLine, StaticDividingLine as StaticDividingLine
|
||||
from argenta.app.autocompleter.entity import AutoCompleter as AutoCompleter
|
||||
from argenta.app.defaults import PredefinedMessages as PredefinedMessages
|
||||
from argenta.app.dividing_line.models import \
|
||||
DynamicDividingLine as DynamicDividingLine
|
||||
from argenta.app.dividing_line.models import \
|
||||
StaticDividingLine as StaticDividingLine
|
||||
from argenta.app.models import App as App
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
from argenta.app.dividing_line.models import StaticDividingLine as StaticDividingLine, DynamicDividingLine as DynamicDividingLine
|
||||
from argenta.app.dividing_line.models import \
|
||||
DynamicDividingLine as DynamicDividingLine
|
||||
from argenta.app.dividing_line.models import \
|
||||
StaticDividingLine as StaticDividingLine
|
||||
|
||||
@@ -5,25 +5,22 @@ import re
|
||||
from contextlib import redirect_stdout
|
||||
from typing import Never, TypeAlias
|
||||
|
||||
from art import text2art # pyright: ignore[reportMissingTypeStubs, reportUnknownVariableType]
|
||||
from art import \
|
||||
text2art # pyright: ignore[reportMissingTypeStubs, reportUnknownVariableType]
|
||||
from rich.console import Console
|
||||
from rich.markup import escape
|
||||
|
||||
from argenta.app.autocompleter import AutoCompleter
|
||||
from argenta.app.dividing_line.models import DynamicDividingLine, StaticDividingLine
|
||||
from argenta.app.protocols import (
|
||||
DescriptionMessageGenerator,
|
||||
from argenta.app.dividing_line.models import (DynamicDividingLine,
|
||||
StaticDividingLine)
|
||||
from argenta.app.protocols import (DescriptionMessageGenerator,
|
||||
EmptyCommandHandler,
|
||||
NonStandardBehaviorHandler,
|
||||
Printer,
|
||||
)
|
||||
NonStandardBehaviorHandler, Printer)
|
||||
from argenta.app.registered_routers.entity import RegisteredRouters
|
||||
from argenta.command.exceptions import (
|
||||
EmptyInputCommandException,
|
||||
from argenta.command.exceptions import (EmptyInputCommandException,
|
||||
InputCommandException,
|
||||
RepeatedInputFlagsException,
|
||||
UnprocessedInputFlagException,
|
||||
)
|
||||
UnprocessedInputFlagException)
|
||||
from argenta.command.models import Command, InputCommand
|
||||
from argenta.response import Response
|
||||
from argenta.router import Router
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from argenta.command.models import Command as Command, InputCommand as InputCommand
|
||||
from argenta.command.flag import Flag as Flag
|
||||
from argenta.command.flag import Flags as Flags
|
||||
from argenta.command.flag import PossibleValues as PossibleValues
|
||||
from argenta.command.flag.defaults import PredefinedFlags as PredefinedFlags
|
||||
from argenta.command.flag import (Flag as Flag,
|
||||
Flags as Flags,
|
||||
PossibleValues as PossibleValues)
|
||||
from argenta.command.models import Command as Command
|
||||
from argenta.command.models import InputCommand as InputCommand
|
||||
|
||||
@@ -5,10 +5,11 @@ __all__ = [
|
||||
"EmptyInputCommandException",
|
||||
]
|
||||
|
||||
from argenta.command.flag.models import Flag, InputFlag
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import override
|
||||
|
||||
from argenta.command.flag.models import Flag, InputFlag
|
||||
|
||||
|
||||
class InputCommandException(ABC, Exception):
|
||||
"""
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from argenta.command.flag.models import (
|
||||
Flag as Flag,
|
||||
InputFlag as InputFlag,
|
||||
PossibleValues as PossibleValues,
|
||||
ValidationStatus as ValidationStatus
|
||||
)
|
||||
from argenta.command.flag.flags.models import Flags as Flags
|
||||
from argenta.command.flag.models import Flag as Flag
|
||||
from argenta.command.flag.models import InputFlag as InputFlag
|
||||
from argenta.command.flag.models import PossibleValues as PossibleValues
|
||||
from argenta.command.flag.models import ValidationStatus as ValidationStatus
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
__all__ = ["PredefinedFlags"]
|
||||
|
||||
from typing import Literal
|
||||
from argenta.command.flag.models import Flag, PossibleValues
|
||||
import re
|
||||
from typing import Literal
|
||||
|
||||
from argenta.command.flag.models import Flag, PossibleValues
|
||||
|
||||
DEFAULT_PREFIX: Literal["-", "--", "---"] = "-"
|
||||
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
from argenta.command.flag.flags.models import (
|
||||
Flags as Flags,
|
||||
InputFlags as InputFlags
|
||||
)
|
||||
from argenta.command.flag.flags.models import Flags as Flags
|
||||
from argenta.command.flag.flags.models import InputFlags as InputFlags
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
__all__ = ["Flags", "InputFlags"]
|
||||
|
||||
from argenta.command.flag.models import InputFlag, Flag
|
||||
from typing import Generic, TypeVar, override
|
||||
from collections.abc import Iterator
|
||||
from typing import Generic, TypeVar, override
|
||||
|
||||
from argenta.command.flag.models import Flag, InputFlag
|
||||
|
||||
FlagType = TypeVar("FlagType")
|
||||
|
||||
|
||||
@@ -3,15 +3,13 @@ __all__ = [
|
||||
"InputCommand"
|
||||
]
|
||||
|
||||
from argenta.command.flag.models import Flag, InputFlag, ValidationStatus
|
||||
from argenta.command.flag.flags.models import InputFlags, Flags
|
||||
from argenta.command.exceptions import (
|
||||
UnprocessedInputFlagException,
|
||||
RepeatedInputFlagsException,
|
||||
EmptyInputCommandException,
|
||||
)
|
||||
from typing import Never, Self, cast, Literal
|
||||
from typing import Literal, Never, Self, cast
|
||||
|
||||
from argenta.command.exceptions import (EmptyInputCommandException,
|
||||
RepeatedInputFlagsException,
|
||||
UnprocessedInputFlagException)
|
||||
from argenta.command.flag.flags.models import Flags, InputFlags
|
||||
from argenta.command.flag.models import Flag, InputFlag, ValidationStatus
|
||||
|
||||
ParseFlagsResult = tuple[InputFlags, str | None, str | None]
|
||||
ParseResult = tuple[str, InputFlags]
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
from argenta.di.integration import inject as inject
|
||||
from argenta.di.integration import FromDishka as FromDishka
|
||||
from argenta.di.integration import inject as inject
|
||||
|
||||
@@ -3,11 +3,10 @@ __all__ = ["inject", "setup_dishka", "FromDishka"]
|
||||
from typing import Any, Callable, TypeVar
|
||||
|
||||
from dishka import Container, FromDishka
|
||||
from dishka.integrations.base import wrap_injection, is_dishka_injected
|
||||
from dishka.integrations.base import is_dishka_injected, wrap_injection
|
||||
|
||||
from argenta.response import Response
|
||||
from argenta.app import App
|
||||
|
||||
from argenta.response import Response
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ __all__ = [
|
||||
'SystemProvider',
|
||||
]
|
||||
|
||||
from argenta.orchestrator.argparser import ArgParser
|
||||
from dishka import Provider, provide, Scope
|
||||
from dishka import Provider, Scope, provide
|
||||
|
||||
from argenta.orchestrator.argparser import ArgParser
|
||||
from argenta.orchestrator.argparser.entity import ArgSpace
|
||||
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
from argenta.metrics.main import get_time_of_pre_cycle_setup as get_time_of_pre_cycle_setup
|
||||
from argenta.metrics.main import \
|
||||
get_time_of_pre_cycle_setup as get_time_of_pre_cycle_setup
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
from argenta.orchestrator.argparser.arguments import \
|
||||
BooleanArgument as BooleanArgument
|
||||
from argenta.orchestrator.argparser.arguments import \
|
||||
ValueArgument as ValueArgument
|
||||
from argenta.orchestrator.argparser.entity import ArgParser as ArgParser
|
||||
from argenta.orchestrator.argparser.arguments import BooleanArgument as BooleanArgument, ValueArgument as ValueArgument
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from argenta.orchestrator.argparser.arguments.models import (
|
||||
BooleanArgument as BooleanArgument,
|
||||
ValueArgument as ValueArgument,
|
||||
from argenta.orchestrator.argparser.arguments.models import \
|
||||
BooleanArgument as BooleanArgument
|
||||
from argenta.orchestrator.argparser.arguments.models import \
|
||||
InputArgument as InputArgument
|
||||
)
|
||||
from argenta.orchestrator.argparser.arguments.models import \
|
||||
ValueArgument as ValueArgument
|
||||
|
||||
@@ -6,12 +6,10 @@ __all__ = [
|
||||
from argparse import ArgumentParser, Namespace
|
||||
from typing import Never, Self
|
||||
|
||||
from argenta.orchestrator.argparser.arguments.models import (
|
||||
BaseArgument,
|
||||
from argenta.orchestrator.argparser.arguments.models import (BaseArgument,
|
||||
BooleanArgument,
|
||||
InputArgument,
|
||||
ValueArgument
|
||||
)
|
||||
ValueArgument)
|
||||
|
||||
|
||||
class ArgSpace:
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
__all__ = ["Orchestrator"]
|
||||
|
||||
from argenta.app import App
|
||||
|
||||
from argenta.orchestrator.argparser import ArgParser
|
||||
from argenta.di.integration import setup_dishka
|
||||
from argenta.di.providers import SystemProvider
|
||||
|
||||
from dishka import Provider, make_container
|
||||
|
||||
from argenta.app import App
|
||||
from argenta.di.integration import setup_dishka
|
||||
from argenta.di.providers import SystemProvider
|
||||
from argenta.orchestrator.argparser import ArgParser
|
||||
|
||||
DEFAULT_ARGPARSER: ArgParser = ArgParser(processed_args=[])
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ from dishka import Container
|
||||
from argenta.command.flag.flags.models import InputFlags
|
||||
from argenta.response.status import ResponseStatus
|
||||
|
||||
|
||||
EMPTY_INPUT_FLAGS: InputFlags = InputFlags()
|
||||
|
||||
|
||||
|
||||
@@ -2,5 +2,4 @@ __all__ = ["system_router"]
|
||||
|
||||
from argenta.router import Router
|
||||
|
||||
|
||||
system_router = Router(title="System points:")
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
__all__ = ["Router"]
|
||||
|
||||
from inspect import (get_annotations, getfullargspec, getsourcefile,
|
||||
getsourcelines)
|
||||
from typing import Callable, TypeAlias
|
||||
from inspect import getfullargspec, get_annotations, getsourcefile, getsourcelines
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
from argenta.command import Command, InputCommand
|
||||
from argenta.command.flag import ValidationStatus
|
||||
from argenta.response import Response, ResponseStatus
|
||||
from argenta.router.command_handler.entity import CommandHandlers, CommandHandler
|
||||
from argenta.command.flag.flags import Flags, InputFlags
|
||||
from argenta.router.exceptions import (
|
||||
RepeatedFlagNameException,
|
||||
from argenta.response import Response, ResponseStatus
|
||||
from argenta.router.command_handler.entity import (CommandHandler,
|
||||
CommandHandlers)
|
||||
from argenta.router.exceptions import (RepeatedFlagNameException,
|
||||
RequiredArgumentNotPassedException,
|
||||
TriggerContainSpacesException,
|
||||
)
|
||||
|
||||
TriggerContainSpacesException)
|
||||
|
||||
HandlerFunc: TypeAlias = Callable[..., None]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user