Python <3.10 typing compat: Callable

`collections.abc.Callable` subscripting was added in Python 3.10,
use `typing.Callable` instead.
This commit is contained in:
lojack5
2023-10-18 13:15:25 -06:00
parent 804d3f15e3
commit 1bdc66afc6

View File

@@ -80,9 +80,10 @@ header_pyi = """\
typing_imports = """\
from __future__ import annotations
from collections.abc import Callable
from enum import IntEnum, IntFlag, auto
from typing import Any, overload, TypeAlias, TypeVar, ParamSpec, Generic, Union, Optional, List, Tuple
from typing import (Any, overload, TypeAlias, TypeVar, ParamSpec, Generic,
Union, Optional, List, Tuple, Callable
)
"""