diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ddd1ab1..bb59985 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,12 +54,6 @@ repos: args: [] additional_dependencies: - pytest - # Since the "python_version" set in the "tool.mypy" section of "pyproject.toml" is "3.8", - # we ensure type checking also works when running the hook from Python versions above 3.8 by always - # installing "importlib_metadata". Note that because the "importlib.metadata.distribution" - # module was added in Python version 3.10 and later, this line can be removed when only supporting - # Python versions 3.10 and above. - - importlib_metadata>=2.0 - repo: https://github.com/codespell-project/codespell rev: "v2.2.6" diff --git a/pyproject.toml b/pyproject.toml index 1b72392..2737df0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ classifiers = [ "Typing :: Typed", ] dynamic = ["version"] -dependencies = ["importlib_metadata>=2.0; python_version<'3.10'"] +dependencies = [] [project.optional-dependencies] test = [ diff --git a/src/idc_index_data/__init__.py b/src/idc_index_data/__init__.py index 80c2097..217cd24 100644 --- a/src/idc_index_data/__init__.py +++ b/src/idc_index_data/__init__.py @@ -6,14 +6,9 @@ from __future__ import annotations -import sys +from importlib.metadata import distribution from pathlib import Path -if sys.version_info >= (3, 10): - from importlib.metadata import distribution -else: - from importlib_metadata import distribution - from ._version import version as __version__ __all__ = [