Skip to content

Commit 73cc121

Browse files
committed
Change pre-commit to use ruff
1 parent c99b3d9 commit 73cc121

File tree

2 files changed

+6
-71
lines changed

2 files changed

+6
-71
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -10,65 +10,12 @@ repos:
1010
exclude: \.(po|pot|yml|yaml)$
1111
- id: end-of-file-fixer
1212
exclude: \.(po|pot|yml|yaml)$
13-
- repo: https://github.com/PyCQA/autoflake
14-
rev: v2.3.1
13+
- repo: https://github.com/astral-sh/ruff-pre-commit
14+
rev: v0.11.9
1515
hooks:
16-
- id: autoflake
17-
# args:
18-
# - --in-place
19-
# - --remove-all-unused-imports
20-
# - --expand-star-imports
21-
# - --remove-duplicate-keys
22-
# - --remove-unused-variables
23-
- repo: https://github.com/asottile/pyupgrade
24-
rev: v3.19.1
25-
hooks:
26-
- id: pyupgrade
27-
exclude: \.(po|pot|yml|yaml)$
28-
- repo: https://github.com/PyCQA/isort
29-
rev: 6.0.1
30-
hooks:
31-
- id: isort
32-
exclude: \.(po|pot|yml|yaml)$
33-
- repo: https://github.com/psf/black
34-
rev: 25.1.0
35-
hooks:
36-
- id: black
37-
args: [--safe, --quiet]
38-
exclude: \.(po|pot|yml|yaml)$
39-
- repo: https://github.com/Pierre-Sassoulas/black-disable-checker
40-
rev: v1.1.3
41-
hooks:
42-
- id: black-disable-checker
43-
# - repo: https://github.com/PyCQA/flake8
44-
# rev: 4.0.1
45-
# hooks:
46-
# - id: flake8
47-
# additional_dependencies: [flake8-typing-imports==1.12.0]
48-
# - repo: local
49-
# hooks:
50-
# - id: pylint
51-
# name: pylint
52-
# entry: pylint
53-
# language: system
54-
# types: [python]
55-
# args: ["-rn", "-sn", "--rcfile=.pylintrc", "--fail-on=I"]
56-
# # We define an additional manual step to allow running pylint with a spelling
57-
# # checker in CI.
58-
# - id: pylint
59-
# alias: pylint-with-spelling
60-
# name: pylint
61-
# entry: pylint
62-
# language: system
63-
# types: [python]
64-
# args: ["-rn", "-sn", "--rcfile=.pylintrc", "--fail-on=I", "--spelling-dict=en"]
65-
# stages: [manual]
66-
# - id: mypy
67-
# name: mypy
68-
# entry: mypy
69-
# language: system
70-
# types: [python]
71-
# args: ["--non-interactive"]
16+
- id: ruff
17+
args: [ --fix ]
18+
- id: ruff-format
7219
# - repo: https://github.com/myint/rstcheck
7320
# rev: "v5.0.0"
7421
# hooks:
@@ -86,15 +33,3 @@ repos:
8633
- id: prettier
8734
args: [--prose-wrap=always, --print-width=88]
8835
exclude: \.(po|pot|yml|yaml)$
89-
- repo: https://github.com/DanielNoord/pydocstringformatter
90-
rev: v0.7.3
91-
hooks:
92-
- id: pydocstringformatter
93-
exclude: \.(po|pot|yml|yaml)$
94-
args:
95-
[
96-
--style=numpydoc,
97-
--no-numpydoc-name-type-spacing,
98-
--no-final-period,
99-
--no-capitalize-first-letter,
100-
]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ quote-style = "double"
9797
indent-style = "space"
9898
skip-magic-trailing-comma = false
9999
line-ending = "auto"
100-
docstring-code-format = false
100+
docstring-code-format = true
101101
docstring-code-line-length = "dynamic"
102102
exclude = [
103103
"discord/_version.py"

0 commit comments

Comments
 (0)