From 6522c1d4a1a3ac283500de1d07f5ffb1c5303e1b Mon Sep 17 00:00:00 2001 From: raisadz <34237447+raisadz@users.noreply.github.com> Date: Fri, 13 Sep 2024 11:04:48 +0100 Subject: [PATCH] import type extensions for old python versions --- tests/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index f002a67b3..36bc539c5 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -7,12 +7,16 @@ from typing import Callable from typing import Iterator from typing import Sequence -from typing import TypeAlias import pandas as pd from narwhals.typing import IntoFrame +if sys.version_info >= (3, 10): + from typing import TypeAlias +else: + from typing_extensions import TypeAlias + Constructor: TypeAlias = Callable[[Any], IntoFrame]