From d4926c9c67a565bc40b370cf9bce22d13bb58e7d Mon Sep 17 00:00:00 2001 From: Serhii Tereshchenko Date: Fri, 31 May 2024 11:18:21 +0300 Subject: [PATCH] fix(types): Fix ParamSpec import Refs https://github.com/microsoft/pyright/issues/8018 --- setup.cfg | 2 +- src/decopatch/main.pyi | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/setup.cfg b/setup.cfg index 936e613..45c631b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,7 +35,7 @@ setup_requires = pytest-runner install_requires = makefun>=1.5.0 - typing-extensions>=4.2;python_version>'3.6' and python_version<'3.10' + typing-extensions>=4.2 # note: do not use double quotes in these, this triggers a weird bug in PyCharm in debug mode only funcsigs;python_version<'3.3' enum34;python_version<'3.4' diff --git a/src/decopatch/main.pyi b/src/decopatch/main.pyi index 3c4f437..9769d99 100644 --- a/src/decopatch/main.pyi +++ b/src/decopatch/main.pyi @@ -1,11 +1,6 @@ from typing import Any, Callable, Optional, Protocol, TypeVar, overload -try: - # We're importing typing_extensions version first, becouse it will - # detect best available implementation depending on python version. - from typing_extensions import ParamSpec -except ImportError: - from typing import ParamSpec +from typing_extensions import ParamSpec from decopatch.utils_disambiguation import FirstArgDisambiguation from decopatch.utils_modes import SignatureInfo