From c59780e8170ff617a20ab2a981d4c55ecf6f9860 Mon Sep 17 00:00:00 2001 From: Marco Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Sun, 11 Aug 2024 16:15:21 +0100 Subject: [PATCH] cross-version compat --- py-polars/polars/dataframe/plotting.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/py-polars/polars/dataframe/plotting.py b/py-polars/polars/dataframe/plotting.py index 024809c4899c..042bd80f8caa 100644 --- a/py-polars/polars/dataframe/plotting.py +++ b/py-polars/polars/dataframe/plotting.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Callable, Mapping, Union, Unpack +from typing import TYPE_CHECKING, Any, Callable, Mapping, Union if TYPE_CHECKING: import sys @@ -22,6 +22,10 @@ from typing import TypeAlias else: from typing_extensions import TypeAlias + if sys.version_info >= (3, 11): + from typing import Unpack + else: + from typing_extensions import Unpack ChannelType: TypeAlias = Union[str, Mapping[str, Any], Any]