diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c53da1..31526e5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -31,27 +31,27 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - - repo: https://github.com/psf/black - rev: 25.1.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 25.9.0 hooks: - id: black additional_dependencies: [toml] - repo: https://github.com/adamchainz/blacken-docs - rev: 1.19.1 + rev: 1.20.0 hooks: - id: blacken-docs additional_dependencies: [black] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.12.2" + rev: "v0.13.3" hooks: - id: ruff args: - --fix - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.16.1" + rev: "v1.18.2" hooks: - id: mypy args: diff --git a/docs/_ext/sphinx_ext_cosmology_api.py b/docs/_ext/sphinx_ext_cosmology_api.py index 266ef07..3c2d977 100644 --- a/docs/_ext/sphinx_ext_cosmology_api.py +++ b/docs/_ext/sphinx_ext_cosmology_api.py @@ -11,9 +11,10 @@ except ImportError: get_overloads = None -import cosmology import cosmology.api +import cosmology + DOCS_MODULE_NAME = "cosmology.docs" diff --git a/tests/core/test_pkg.py b/tests/core/test_pkg.py index 5d8ab42..0685ddf 100644 --- a/tests/core/test_pkg.py +++ b/tests/core/test_pkg.py @@ -3,8 +3,9 @@ def test_imported(): """This is a namespace package, so it should be importable.""" - import cosmology # noqa: PLC0415 import cosmology.api # noqa: PLC0415 + import cosmology # noqa: PLC0415 + assert cosmology.__name__ == "cosmology" assert cosmology.api.__name__ == "cosmology.api"