Skip to content

Commit

Permalink
suppress import error
Browse files Browse the repository at this point in the history
  • Loading branch information
ebonnal committed Oct 16, 2024
1 parent 6b864a6 commit e5c3475
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion streamable/functions.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import builtins
import datetime
from contextlib import suppress
from typing import (
Any,
Callable,
Coroutine,
Iterable,
Iterator,
List,
Literal,
Optional,
Type,
TypeVar,
cast,
)

with suppress(ImportError):
from typing import Literal

from streamable.iters import (
AsyncConcurrentMappingIterable,
ByKeyGroupingIterator,
Expand Down
4 changes: 3 additions & 1 deletion streamable/iters.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
Iterable,
Iterator,
List,
Literal,
NamedTuple,
Optional,
Tuple,
Expand All @@ -28,6 +27,9 @@
cast,
)

with suppress(ImportError):
from typing import Literal

from streamable.util.functiontools import catch_and_raise_as

T = TypeVar("T")
Expand Down
2 changes: 1 addition & 1 deletion streamable/stream.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from contextlib import suppress
import datetime
import logging
from contextlib import suppress
from multiprocessing import get_logger
from typing import (
TYPE_CHECKING,
Expand Down

0 comments on commit e5c3475

Please sign in to comment.