@@ -38,81 +38,29 @@ repos:
3838 - id : mixed-line-ending
3939 args : ['--fix=lf']
4040
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-
5441- repo : https://github.com/adamchainz/django-upgrade
5542 rev : " 1.14.1"
5643 hooks :
5744 - id : django-upgrade
5845 args : [--target-version, "4.2"]
5946
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-
8647- repo : https://github.com/asottile/blacken-docs
8748 rev : 1.16.0
8849 hooks :
8950 - id : blacken-docs
9051 additional_dependencies : [black==23.7.0]
9152
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-
11553- repo : https://github.com/aspiredu/django-safemigrate
11654 rev : " 4.2"
11755 hooks :
11856 - 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