From af9841c7c8a77806fdcb3fa19fcbfb59a9c59800 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 06:39:28 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 22.3.0 → 23.3.0](https://github.com/psf/black/compare/22.3.0...23.3.0) - [github.com/pre-commit/pre-commit-hooks: v4.2.0 → v4.4.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.2.0...v4.4.0) - [github.com/pycqa/flake8: 4.0.1 → 6.0.0](https://github.com/pycqa/flake8/compare/4.0.1...6.0.0) - https://github.com/asottile/reorder_python_imports → https://github.com/asottile/reorder-python-imports - [github.com/asottile/reorder-python-imports: v3.1.0 → v3.10.0](https://github.com/asottile/reorder-python-imports/compare/v3.1.0...v3.10.0) - [github.com/asottile/pyupgrade: v2.32.1 → v3.8.0](https://github.com/asottile/pyupgrade/compare/v2.32.1...v3.8.0) - [github.com/tox-dev/pyproject-fmt: 0.3.3 → 0.13.0](https://github.com/tox-dev/pyproject-fmt/compare/0.3.3...0.13.0) - [github.com/pre-commit/mirrors-mypy: v0.960 → v1.4.1](https://github.com/pre-commit/mirrors-mypy/compare/v0.960...v1.4.1) --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 From 4455e6605868d40873dffcd04daa4f3116400f8c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 06:41:36 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 36 ++++++++++++++++++------------------ src/apipkg/_alias_module.py | 1 - test_apipkg.py | 1 - 3 files changed, 18 insertions(+), 20 deletions(-) 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")