Skip to content

Commit

Permalink
add typing_extensions for ParamSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
zariiii9003 committed Oct 17, 2023
1 parent d2ad53f commit 5da57c0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ classifiers = [
dependencies = [
"psutil",
"numpy>=1.21",
"typing-extensions;python_version<'3.10'",
]
dynamic = ["version"]

Expand Down Expand Up @@ -82,7 +83,6 @@ select = [
"E", # pycodestyle
"EM", # flake8-errmsg
"F", # pyflakes
"FURB",
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
Expand Down
9 changes: 8 additions & 1 deletion src/pycanape/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@

import ctypes
import logging
import sys
import winreg
from collections.abc import Callable
from ctypes.util import find_library
from threading import Lock
from typing import Any, ParamSpec, TypeVar
from typing import Any, TypeVar

import psutil

if sys.version_info >= (3, 10):
from typing import ParamSpec
else:
from typing_extensions import ParamSpec


LOG = logging.getLogger(__name__)
LOCK = Lock()

Expand Down

0 comments on commit 5da57c0

Please sign in to comment.