@@ -38,81 +38,29 @@ repos:
38
38
- id : mixed-line-ending
39
39
args : ['--fix=lf']
40
40
41
- - repo : https://github.com/PyCQA/autoflake
42
- rev : v2.2.0
43
- hooks :
44
- - id : autoflake
45
- args : ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
46
-
47
- # TODO: re-enable it and use `--range` to select the modified lines
48
- # - repo: https://github.com/myint/docformatter.git
49
- # rev: v1.4
50
- # hooks:
51
- # - id: docformatter
52
- # args: ['--in-place', '--wrap-summaries=80', '--wrap-descriptions=80', '--pre-summary-newline']
53
-
54
41
- repo : https://github.com/adamchainz/django-upgrade
55
42
rev : " 1.14.1"
56
43
hooks :
57
44
- id : django-upgrade
58
45
args : [--target-version, "4.2"]
59
46
60
- - repo : https://github.com/psf/black
61
- rev : 23.7.0
62
- hooks :
63
- - id : black
64
- # It is recommended to specify the latest version of Python
65
- # supported by your project here, or alternatively use
66
- # pre-commit's default_language_version, see
67
- # https://pre-commit.com/#top_level-default_language_version
68
- language_version : python3.10
69
- exclude : |
70
- (?x)^(
71
- readthedocs/rtd_tests/files/conf.py|
72
- .*/migrations/.*
73
- )$
74
-
75
- # NOTE: run `isort` after `black` to keep the format of isort finally
76
- - repo : https://github.com/pycqa/isort
77
- rev : 5.12.0
78
- hooks :
79
- - id : isort
80
- name : isort (python)
81
- exclude : |
82
- (?x)^(
83
- .*/migrations/.*
84
- )
85
-
86
47
- repo : https://github.com/asottile/blacken-docs
87
48
rev : 1.16.0
88
49
hooks :
89
50
- id : blacken-docs
90
51
additional_dependencies : [black==23.7.0]
91
52
92
- - repo : https://github.com/PyCQA/prospector
93
- rev : 1.10.2
94
- hooks :
95
- - id : prospector
96
- args :
97
- - --profile=prospector.yml
98
- - --die-on-tool-error
99
- exclude : |
100
- (?x)^(
101
- docs/.*|
102
- common/.*|
103
- .*/settings/.*|
104
- .*/rtd_tests/.*|
105
- .*/tests/.*|
106
- .*/migrations/.*
107
- )$
108
- # This PYTHONPATH environment variable is required for readthedocs-corporate when running `tox -e pre-commit`
109
- entry : env PYTHONPATH=readthedocs:../readthedocs.org:./ DJANGO_SETTINGS_MODULE=readthedocs.settings.test prospector
110
- # We have to install the dependencies from an URL since we don't have access to this file easily from pre-commit
111
- additional_dependencies :
112
- - -r
113
- - https://raw.githubusercontent.com/readthedocs/readthedocs.org/main/requirements/testing.txt
114
-
115
53
- repo : https://github.com/aspiredu/django-safemigrate
116
54
rev : " 4.2"
117
55
hooks :
118
56
- id : check
57
+
58
+ - repo : https://github.com/astral-sh/ruff-pre-commit
59
+ # Ruff version.
60
+ rev : v0.9.9
61
+ hooks :
62
+ # Run the linter.
63
+ - id : ruff
64
+ args : [ --fix ]
65
+ # Run the formatter.
66
+ - id : ruff-format
0 commit comments