diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3549b982a..107334a66 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,17 +4,17 @@ repos: hooks: - id: end-of-file-fixer - id: trailing-whitespace - - repo: https://github.com/psf/black - rev: 23.10.0 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.2 hooks: - - id: black + - id: ruff-format - repo: https://github.com/codespell-project/codespell rev: v2.2.6 hooks: - id: codespell args: ["--ignore-words-list", "crate,releas", "--skip", "*.svg"] additional_dependencies: - - tomli + - tomli>=2.0.1 - repo: https://github.com/tox-dev/tox-ini-fmt rev: 1.3.1 hooks: @@ -24,7 +24,7 @@ repos: rev: 1.2.0 hooks: - id: pyproject-fmt - additional_dependencies: ["tox>=4.10"] + additional_dependencies: ["tox>=4.11.3"] - repo: https://github.com/pre-commit/mirrors-prettier rev: v3.0.3 hooks: @@ -34,12 +34,12 @@ repos: rev: 1.16.0 hooks: - id: blacken-docs - additional_dependencies: [black==23.7] + additional_dependencies: [black==23.10.1] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.1 + rev: v0.1.2 hooks: - id: ruff - args: [--fix, --exit-non-zero-on-fix] + args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes] - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.10.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index 9bdfbcac5..a2bdc9a86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,9 +102,6 @@ build.hooks.vcs.version-file = "src/tox/version.py" build.targets.sdist.include = ["/src", "/tests", "/tox.ini"] version.source = "vcs" -[tool.black] -line-length = 120 - [tool.ruff] select = ["ALL"] line-length = 120 @@ -119,6 +116,15 @@ ignore = [ "D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible "D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible "S104", # Possible binding to all interface + "COM812", # conflicts with formatter + "COM819", # conflicts with formatter + "E501", # conflicts with formatter + "ISC001", # conflicts with formatter + "Q000", # conflicts with formatter + "Q001", # conflicts with formatter + "Q002", # conflicts with formatter + "Q003", # conflicts with formatter + "W191", # conflicts with formatter ] [tool.ruff.per-file-ignores] "tests/**/*.py" = [ diff --git a/src/tox/config/of_type.py b/src/tox/config/of_type.py index 4f6f47bc9..6d0da6670 100644 --- a/src/tox/config/of_type.py +++ b/src/tox/config/of_type.py @@ -116,8 +116,7 @@ def __eq__(self, o: object) -> bool: return ( type(self) == type(o) and super().__eq__(o) - and (self.of_type, self.default, self.post_process) - == (o.of_type, o.default, o.post_process) # type: ignore[attr-defined] + and (self.of_type, self.default, self.post_process) == (o.of_type, o.default, o.post_process) # type: ignore[attr-defined] ) diff --git a/tox.ini b/tox.ini index 346784417..15d2f1da3 100644 --- a/tox.ini +++ b/tox.ini @@ -41,7 +41,7 @@ commands = description = format the code base to adhere to our styles, and complain about what we cannot do automatically skip_install = true deps = - pre-commit>=3.3.3 + pre-commit>=3.5 pass_env = {[testenv]passenv} PROGRAMDATA @@ -52,7 +52,7 @@ commands = [testenv:type] description = run type check on code base deps = - mypy==1.5.1 + mypy==1.6.1 types-cachetools>=5.3.0.6 types-chardet>=5.0.4.6 commands = @@ -73,8 +73,8 @@ commands = description = check that the long description is valid skip_install = true deps = - build[virtualenv]>=0.10 - check-wheel-contents>=0.4 + build[virtualenv]>=1.0.3 + check-wheel-contents>=0.5 twine>=4.0.2 commands = python -m build -o {envtmpdir} -s -w . @@ -85,9 +85,9 @@ commands = description = do a release, required posarg of the version number skip_install = true deps = - gitpython>=3.1.32 - packaging>=23.1 - towncrier>=23.6 + gitpython>=3.1.40 + packaging>=23.2 + towncrier>=23.10 commands = python {toxinidir}/tasks/release.py --version {posargs}