Skip to content

Commit

Permalink
🔥 Replace TypeALias in pycompat with typing_extensions.
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalkrupinski committed Jun 23, 2024
1 parent b345b9c commit 5317863
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/rybak/_types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any, Callable, Iterable, Mapping, TypeVar

from .pycompat import TypeAlias
from typing_extensions import TypeAlias

TemplateData: TypeAlias = Mapping[str, Any]

Expand Down
10 changes: 2 additions & 8 deletions src/rybak/pycompat.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
__all__ = [
__all__ = (
'Traversable',
'TypeAlias',
'files',
]
)

import sys

Expand All @@ -12,8 +11,3 @@
else:
from importlib_resources import files # type: ignore[import-not-found]
from importlib_resources.abc import Traversable # type: ignore[import-not-found]

if sys.version_info >= (3, 10):
from typing import TypeAlias
else:
from typing_extensions import TypeAlias

0 comments on commit 5317863

Please sign in to comment.