From 1bdc66afc65fa5fb469a042ef5e96f851d4608e6 Mon Sep 17 00:00:00 2001 From: lojack5 <1458329+lojack5@users.noreply.github.com> Date: Wed, 18 Oct 2023 13:15:25 -0600 Subject: [PATCH] Python <3.10 typing compat: Callable `collections.abc.Callable` subscripting was added in Python 3.10, use `typing.Callable` instead. --- etgtools/pi_generator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etgtools/pi_generator.py b/etgtools/pi_generator.py index 6aad3ce4..e1c140ca 100644 --- a/etgtools/pi_generator.py +++ b/etgtools/pi_generator.py @@ -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 +) """