Skip to content

Commit

Permalink
lint: fix order of imports cut by with suppress
Browse files Browse the repository at this point in the history
  • Loading branch information
ebonnal committed Oct 16, 2024
1 parent bd4de0d commit b526ac3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
6 changes: 3 additions & 3 deletions streamable/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
cast,
)

with suppress(ImportError):
from typing import Literal

from streamable.iters import (
AsyncConcurrentMappingIterable,
ByKeyGroupingIterator,
Expand Down Expand Up @@ -45,6 +42,9 @@
validate_truncate_args,
)

with suppress(ImportError):
from typing import Literal

T = TypeVar("T")
U = TypeVar("U")

Expand Down
9 changes: 4 additions & 5 deletions streamable/iters.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@
cast,
)

from streamable.util.loggertools import get_logger

with suppress(ImportError):
from typing import Literal

from streamable.util.functiontools import catch_and_raise_as
from streamable.util.loggertools import get_logger

T = TypeVar("T")
U = TypeVar("U")
Expand All @@ -46,6 +42,9 @@
FutureResultCollection,
)

with suppress(ImportError):
from typing import Literal


class CatchingIterator(Iterator[T]):
def __init__(
Expand Down
9 changes: 4 additions & 5 deletions streamable/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@
overload,
)

from streamable.util.loggertools import get_logger

with suppress(ImportError):
from typing import Literal

from streamable.util.constants import NO_REPLACEMENT
from streamable.util.loggertools import get_logger
from streamable.util.validationtools import (
validate_concurrency,
validate_group_interval,
Expand All @@ -37,6 +33,9 @@
validate_via,
)

with suppress(ImportError):
from typing import Literal

# fmt: off
if TYPE_CHECKING: import builtins
if TYPE_CHECKING: from streamable.visitors import Visitor
Expand Down

0 comments on commit b526ac3

Please sign in to comment.