@@ -40,7 +40,7 @@ Here is a minimal `.pre-commit-config.yaml` file with some handy options:
4040``` yaml
4141repos :
4242 - repo : https://github.com/pre-commit/pre-commit-hooks
43- rev : " v4.6 .0"
43+ rev : " v6.0 .0"
4444 hooks :
4545 - id : check-added-large-files
4646 - id : check-case-conflict
@@ -91,7 +91,7 @@ Here is the snippet to add Black to your `.pre-commit-config.yml`:
9191
9292` ` ` yaml
9393- repo: https://github.com/psf/black-pre-commit-mirror
94- rev: "24.8 .0"
94+ rev: "25.9 .0"
9595 hooks:
9696 - id: black
9797` ` `
@@ -115,7 +115,7 @@ Jupyter outputs:
115115
116116` ` ` yaml
117117- repo: https://github.com/kynan/nbstripout
118- rev: "0.7 .1"
118+ rev: "0.8 .1"
119119 hooks:
120120 - id: nbstripout
121121` ` `
@@ -129,7 +129,7 @@ The MyPy addition for pre-commit:
129129
130130` ` ` yaml
131131- repo: https://github.com/pre-commit/mirrors-mypy
132- rev: "v1.11 .2"
132+ rev: "v1.18 .2"
133133 hooks:
134134 - id: mypy
135135 files: src
@@ -141,15 +141,15 @@ designed to avoid configuration, but you should add configuration. You can also
141141add items to the virtual environment setup for MyPy by pre-commit, for example :
142142
143143` ` ` yaml
144- additional_dependencies: [attrs==21.2 .0]
144+ additional_dependencies: [attrs==25.3 .0]
145145` ` `
146146
147147MyPy has a config section in `pyproject.toml` that looks like this :
148148
149149` ` ` ini
150150[tool.mypy]
151151files = "src"
152- python_version = "3.9 "
152+ python_version = "3.10 "
153153strict = true
154154show_error_codes = true
155155enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
@@ -189,9 +189,9 @@ failures from plugins updating without updating your pre-commit hook.
189189
190190` ` ` yaml
191191- repo: https://github.com/astral-sh/ruff-pre-commit
192- rev: "v0.6.8 "
192+ rev: "v0.13.2 "
193193 hooks:
194- - id: ruff
194+ - id: ruff-check
195195 args: ["--fix", "--show-fixes"]
196196 - id: ruff-format
197197` ` `
@@ -230,7 +230,6 @@ extend-select = [
230230ignore = [
231231 "PLR", # Design related pylint codes
232232 "PT004", # Use underscore for non-returning fixture (use usefixture instead)
233- "ISC001", # Conflicts with formatter
234233]
235234flake8-unused-arguments.ignore-variadic-names = true
236235isort.required-imports = ["from __future__ import annotations"]
@@ -250,13 +249,12 @@ disable auto-fixing for specific error codes via `unfixable`.
250249
251250There are other configuration options, such as the `src` list which tells it
252251where to look for top level packages (mostly for "I" codes, which also have a
253- lot of custom configuration options) {% rr RF003 %}, `typing-modules`, which
254- helps apply typing-specific rules to a re-exported typing module (a common
255- practice for unifying typing and `typing_extensions` based on Python version).
256- There's also a file `exclude` set, which you can override if you are running
257- this entirely from pre-commit (default excludes include "build", so if you have
258- a `build` module or file named `build.py`, it would get skipped by default
259- without this).
252+ lot of custom configuration options), `typing-modules`, which helps apply
253+ typing-specific rules to a re-exported typing module (a common practice for
254+ unifying typing and `typing_extensions` based on Python version). There's also a
255+ file `exclude` set, which you can override if you are running this entirely from
256+ pre-commit (default excludes include "build", so if you have a `build` module or
257+ file named `build.py`, it would get skipped by default without this).
260258
261259Here are some good error codes to enable on most (but not all!) projects :
262260
@@ -303,7 +301,7 @@ spell checkers, this has a list of mistakes it looks for, rather than a list of
303301
304302` ` ` yaml
305303- repo: https://github.com/codespell-project/codespell
306- rev: "v2.3.0 "
304+ rev: "v2.4.1 "
307305 hooks:
308306 - id: codespell
309307 args: ["-L", "sur,nd"]
0 commit comments