From 531786304b2bc21149dc419f94931e8ad3c99d13 Mon Sep 17 00:00:00 2001 From: Raphael Krupinski Date: Sun, 23 Jun 2024 10:10:08 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Replace=20TypeALias=20in=20pycom?= =?UTF-8?q?pat=20with=20typing=5Fextensions.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rybak/_types.py | 2 +- src/rybak/pycompat.py | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/rybak/_types.py b/src/rybak/_types.py index 03f78aa..6525029 100644 --- a/src/rybak/_types.py +++ b/src/rybak/_types.py @@ -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] diff --git a/src/rybak/pycompat.py b/src/rybak/pycompat.py index 2751b9a..9dc6e85 100644 --- a/src/rybak/pycompat.py +++ b/src/rybak/pycompat.py @@ -1,8 +1,7 @@ -__all__ = [ +__all__ = ( 'Traversable', - 'TypeAlias', 'files', -] +) import sys @@ -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