diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 69c9bc6..6d0f327 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 23.3.0 hooks: - id: black args: [--safe, --quiet] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v4.4.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -14,27 +14,27 @@ repos: - id: check-yaml - id: debug-statements - repo: https://github.com/pycqa/flake8 - rev: 4.0.1 + rev: 6.0.0 hooks: - id: flake8 additional_dependencies: - flake8-typing-imports==1.9.0 -- repo: https://github.com/asottile/reorder_python_imports - rev: v3.1.0 +- repo: https://github.com/asottile/reorder-python-imports + rev: v3.10.0 hooks: - id: reorder-python-imports args: ['--application-directories=.:src'] - repo: https://github.com/asottile/pyupgrade - rev: v2.32.1 + rev: v3.8.0 hooks: - id: pyupgrade args: [--py37-plus] - repo: https://github.com/tox-dev/pyproject-fmt - rev: "0.3.3" + rev: "0.13.0" hooks: - id: pyproject-fmt - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v0.960' + rev: 'v1.4.1' hooks: - id: mypy diff --git a/pyproject.toml b/pyproject.toml index 486c70f..b573b8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,30 +17,29 @@ authors = [ { name = "holger krekel" }, ] requires-python = ">=3.7" +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Software Development :: Libraries", +] dynamic = [ "version", ] -classifiers = [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Programming Language :: Python", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Topic :: Software Development :: Libraries", -] [project.urls] Homepage = "https://github.com/pytest-dev/apipkg" - [tool.hatch.version] source = "vcs" @@ -63,5 +62,6 @@ python = ["3.7", "3.8", "3.9", "3.10", "3.11"] [tool.hatch.envs.test.scripts] run-coverage = "pytest --cov-config=pyproject.toml --cov=pkg --cov=tests {args}" run = "run-coverage --no-cov {args}" + [mypy] python_version = "3.7" diff --git a/src/apipkg/_alias_module.py b/src/apipkg/_alias_module.py index a6f219a..91efda2 100644 --- a/src/apipkg/_alias_module.py +++ b/src/apipkg/_alias_module.py @@ -6,7 +6,6 @@ def AliasModule(modname: str, modpath: str, attrname: str | None = None) -> ModuleType: - cached_obj: object | None = None def getmod() -> object: diff --git a/test_apipkg.py b/test_apipkg.py index 5100e8c..4080b90 100644 --- a/test_apipkg.py +++ b/test_apipkg.py @@ -869,7 +869,6 @@ def test_importlib_find_spec_aliasmodule(find_spec): def test_importlib_find_spec_initpkg(find_spec, tmpdir, monkeypatch): - modname = "apipkg_test_example_initpkg_findspec" pkgdir = tmpdir.mkdir("apipkg_test_example_initpkg_findspec")