@@ -753,7 +753,8 @@ def generate_vegalite_schema_wrapper(fp: Path, /) -> ModuleDef[str]:
753753 all_ = [* sorted (it ), "Root" , "VegaLiteSchema" , "SchemaBase" , "load_schema" ]
754754 contents = [
755755 HEADER ,
756- "from typing import Any, Literal, Union, Protocol, Sequence, List, Iterator, TYPE_CHECKING" ,
756+ "from collections.abc import Iterator, Sequence" ,
757+ "from typing import Any, Literal, Union, Protocol, TYPE_CHECKING" ,
757758 "import pkgutil" ,
758759 "import json\n " ,
759760 "import narwhals.stable.v1 as nw\n " ,
@@ -871,7 +872,8 @@ def generate_vegalite_channel_wrappers(fp: Path, /) -> ModuleDef[list[str]]:
871872 all_ = sorted (chain (it , COMPAT_EXPORTS ))
872873 imports = [
873874 "import sys" ,
874- "from typing import Any, overload, Sequence, List, Literal, Union, TYPE_CHECKING, TypedDict" ,
875+ "from collections.abc import Sequence" ,
876+ "from typing import Any, overload, Literal, Union, TYPE_CHECKING, TypedDict" ,
875877 import_typing_extensions ((3 , 10 ), "TypeAlias" ),
876878 "import narwhals.stable.v1 as nw" ,
877879 "from altair.utils.schemapi import Undefined, with_property_setters" ,
@@ -1226,7 +1228,8 @@ def vegalite_main(skip_download: bool = False) -> None:
12261228 fp_mixins = schemapath / "mixins.py"
12271229 print (f"Generating\n { schemafile !s} \n ->{ fp_mixins !s} " )
12281230 mixins_imports = (
1229- "from typing import Any, Sequence, List, Literal, Union" ,
1231+ "from collections.abc import Sequence" ,
1232+ "from typing import Any, Literal, Union" ,
12301233 "from altair.utils import use_signature, Undefined, SchemaBase" ,
12311234 "from . import core" ,
12321235 )
@@ -1256,7 +1259,8 @@ def vegalite_main(skip_download: bool = False) -> None:
12561259 fp_theme_config : Path = schemapath / "_config.py"
12571260 content_theme_config = [
12581261 HEADER ,
1259- "from typing import Any, TYPE_CHECKING, Literal, Sequence, TypedDict, Union" ,
1262+ "from collections.abc import Sequence" ,
1263+ "from typing import Any, TYPE_CHECKING, Literal, TypedDict, Union" ,
12601264 import_typing_extensions ((3 , 14 ), "TypedDict" , include_sys = True ),
12611265 f"from ._typing import { ROW_COL_KWDS } , { PADDING_KWDS } " ,
12621266 "\n \n " ,
0 commit comments