diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d1dfe93..2f40932 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,7 +38,7 @@ repos: - id: no_optional - repo: https://github.com/astral-sh/ruff-pre-commit.git - rev: v0.15.9 + rev: v0.16.10 hooks: - id: ruff-check args: @@ -48,7 +48,7 @@ repos: - --show-fixes - repo: https://github.com/astral-sh/ruff-pre-commit.git - rev: v0.15.9 + rev: v0.16.10 hooks: - id: ruff-format alias: ruff-format-first-pass @@ -60,7 +60,7 @@ repos: - id: add-trailing-comma - repo: https://github.com/astral-sh/ruff-pre-commit.git - rev: v0.15.9 + rev: v0.16.10 hooks: - id: ruff-format alias: ruff-format-second-pass @@ -72,7 +72,7 @@ repos: - id: remove-tabs - repo: https://github.com/python-jsonschema/check-jsonschema.git - rev: 0.37.1 + rev: 0.38.2 hooks: - id: check-github-workflows files: ^\.github/workflows/[^/]+$ @@ -131,7 +131,7 @@ repos: - id: debug-statements - repo: https://github.com/codespell-project/codespell.git - rev: v2.4.2 + rev: v2.4.3 hooks: - id: codespell @@ -151,17 +151,17 @@ repos: - id: bashate - repo: https://github.com/shellcheck-py/shellcheck-py.git - rev: v0.11.0.1 + rev: v0.11.0.1-1 hooks: - id: shellcheck - repo: https://github.com/Lucas-C/pre-commit-hooks-lxml.git - rev: v1.1.0 + rev: v1.1.1 hooks: - id: forbid-html-img-without-alt-text - repo: https://github.com/PyCQA/flake8.git - rev: 7.3.0 + rev: 7.4.1 hooks: - id: flake8 additional_dependencies: @@ -179,7 +179,7 @@ repos: language_version: python3 - repo: https://github.com/pre-commit/mirrors-mypy.git - rev: v1.19.1 + rev: v2.4.0 hooks: - id: mypy alias: mypy-py315 @@ -285,7 +285,7 @@ repos: pass_filenames: false - repo: https://github.com/PyCQA/pylint.git - rev: v3.3.9 + rev: v4.1.2 hooks: - id: pylint additional_dependencies: @@ -297,7 +297,7 @@ repos: - tox [testing] >= 4.54.0 - repo: https://github.com/rhysd/actionlint.git - rev: v1.7.10 + rev: v1.7.12 hooks: - id: actionlint additional_dependencies: diff --git a/.ruff.toml b/.ruff.toml index 712b7d2..6190ff5 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -13,14 +13,14 @@ external = [ "WPS", # Do not remove noqa for wemake-python-style (WPS) checks ] ignore = [ - "CPY001", # Skip copyright notice requirement at top of files + "missing-copyright-notice", # Skip copyright notice requirement at top of files # Refs: # * https://github.com/astral-sh/ruff/issues/6606 # * https://github.com/astral-sh/ruff/pull/13286 - "DOC201", # Ruff doesn't understand sphinx-native param lists - "DOC402", # Ruff doesn't understand sphinx-native param lists - "DOC501", # docstring-missing-exception # Ruff doesn't understand sphinx-native param lists + "docstring-missing-returns", # Ruff doesn't understand sphinx-native param lists + "docstring-missing-yields", # Ruff doesn't understand sphinx-native param lists + "docstring-missing-exception", # docstring-missing-exception # Ruff doesn't understand sphinx-native param lists ] preview = true # Live dangerously select = [ @@ -84,9 +84,9 @@ testing = [ # If other ignores are added for a specific file in the section following this, # these will need to be added to that line as well. - "PLC2701", # Allow importing internal files needed for testing - "PLR0913", # Allow parametrized + fixture test signatures with many args - "S101", # Allow use of `assert` in test files + "import-private-name", # Allow importing internal files needed for testing + "too-many-arguments", # Allow parametrized + fixture test signatures with many args + "assert", # Allow use of `assert` in test files ] [lint.pydocstyle] diff --git a/pytest.ini b/pytest.ini index 5b41bff..446254b 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,5 @@ [pytest] +usefixtures = check_os_environ_stable _isolate_user_environment addopts = # `pytest-xdist`: --numprocesses=auto diff --git a/src/tox_plugins/towncrier/_plugin.py b/src/tox_plugins/towncrier/_plugin.py index ff7b142..36e8bd0 100644 --- a/src/tox_plugins/towncrier/_plugin.py +++ b/src/tox_plugins/towncrier/_plugin.py @@ -12,7 +12,6 @@ if _t.TYPE_CHECKING: from collections import abc as _c # noqa: WPS347 - from tox.config.sets import ConfigSet from tox.session.state import State @@ -37,12 +36,10 @@ def tox_extend_envs() -> _c.Iterable[str]: @impl def tox_add_core_config( - core_conf: ConfigSet, # noqa: ARG001 # pylint: disable=unused-argument state: State, ) -> None: """Inject default configuration for Towncrier environments. - :param core_conf: The core tox configuration set (unused). :param state: The tox session state to inject environments into. """ pos_args = state.conf.pos_args(to_path=None) diff --git a/tests/conftest.py b/tests/conftest.py index 02fd59e..117dafd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,7 +10,7 @@ pytest_plugins = ('tox.pytest',) -@pytest.fixture(autouse=True) +@pytest.fixture def _isolate_user_environment(monkeypatch: pytest.MonkeyPatch) -> None: """Isolate the tests from the user's tox configuration.