You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-23Lines changed: 6 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,6 @@ This repository provides the following pre-commit hooks:
18
18
-[check-merge-conflict](#check-merge-conflict) - check for merge conflicts.
19
19
-[mypy](#mypy) - run [MyPy](#https://github.com/python/mypy).
20
20
-[spell-check-commit-msgs](#spell-check-commit-msgs) - check for spelling errors in commit messages.
21
-
-[dict-rewrite](#dict-rewrite) - rewrite string-keyed dictionaries to use `dict`.
22
21
23
22
### dbg-check
24
23
@@ -59,28 +58,6 @@ You can set the MyPy version in the requirements file (eg `mypy==1.17.1`), other
59
58
This uses [`codespell`](https://github.com/codespell-project/codespell) under the hood, and accepts the same flags via the `args` field, but interactive mode is not supported.
60
59
You need to ensure that you install the `commit-msg` hooks, which you can do with `pre-commit install -t pre-commit -t commit-msg` or adding `default_install_hook_types: ["pre-commit", "commit-msg"]` to the `.pre-commit-config.yaml` (like below).
61
60
62
-
### dict-rewrite
63
-
64
-
Make string-based dictionaries use `dict` instead of curly braces. For example,
65
-
66
-
```python
67
-
{
68
-
"a": "ascii",
69
-
"r": repr,
70
-
"integer": 15,
71
-
}
72
-
# is rewritten as
73
-
dict(
74
-
a="ascii",
75
-
r=repr,
76
-
integer=15
77
-
)
78
-
```
79
-
80
-
Use the `--fix` arg to apply the change, as well as linting files.
81
-
The change may disrupt the style of the code, so consider using a formatter, such as [`ruff`](https://github.com/astral-sh/ruff/).
82
-
It is possible to ignore dictionaries using `# dict-ignore`.
0 commit comments