diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e6f0cfe..7bbf6e1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,3 +25,6 @@ repos: rev: v1.13.0 hooks: - id: mypy + additional_dependencies: + - cython + - setuptools diff --git a/src/witty/compile_module.py b/src/witty/compile_module.py index 2794d8f..76c5da2 100644 --- a/src/witty/compile_module.py +++ b/src/witty/compile_module.py @@ -12,16 +12,12 @@ from Cython.Build import cythonize from Cython.Build.Inline import build_ext from Cython.Utils import get_cython_cache_dir +from setuptools import Distribution, Extension if TYPE_CHECKING: from collections.abc import Iterator, Sequence from types import ModuleType -try: - from distutils.core import Distribution, Extension # until Python 3.11 -except ImportError: - from setuptools import Distribution, Extension - def compile_module( source_pyx: str,