@@ -45,53 +45,15 @@ repos:
4545 name : Formatting the pyproject.toml file
4646 additional_dependencies : ["tox>=4.9"]
4747
48- # Automatic source code formatting
49- - repo : https://github.com/psf/black
50- rev : 24.3.0 # Released 2024-03-15
48+ # Format and lint using Ruff
49+ - repo : https://github.com/astral-sh/ruff-pre-commit
50+ rev : v0.14.0
5151 hooks :
52- - id : black
53- name : Formatting Python scripts according to Black
54- args : [--safe, --quiet]
55-
56- # Automatically sort imports
57- - repo : https://github.com/PyCQA/isort
58- rev : 5.13.2 # Released 2023-12-13
59- hooks :
60- - id : isort
61- name : Tidying Python imports via Isort
62- args : [
63- # '-a', 'from __future__ import annotations', # 3.7-3.11
64- " --rm" ,
65- " from __future__ import absolute_import" , # -3.0
66- " --rm" ,
67- " from __future__ import division" , # -3.0
68- " --rm" ,
69- " from __future__ import generator_stop" , # -3.7
70- " --rm" ,
71- " from __future__ import generators" , # -2.3
72- " --rm" ,
73- " from __future__ import nested_scopes" , # -2.2
74- " --rm" ,
75- " from __future__ import print_function" , # -3.0
76- " --rm" ,
77- " from __future__ import unicode_literals" , # -3.0
78- " --rm" ,
79- " from __future__ import with_statement" , # -2.6
80- ]
81-
82- # Linting
83- - repo : https://github.com/PyCQA/flake8
84- # Release history: https://flake8.pycqa.org/en/latest/release-notes/index.html
85- rev : 7.0.0 # Released 2024-01-05
86- hooks :
87- - id : flake8
88- name : Running Flake8 linter on Python files
89- additional_dependencies : [
90- # Added Flake8-pyproject plugin for .toml compatibility
91- " Flake8-pyproject==1.2.3" , # Released 2023-03-21
92- # flake8-comprehensions URL: https://github.com/adamchainz/flake8-comprehensions
93- " flake8-comprehensions==3.14.0" , # Released 2023-07-10
94- ]
52+ - id : ruff
53+ name : Running Ruff linter
54+ args : ["--fix"]
55+ - id : ruff-format
56+ name : Running Ruff formatter
9557
9658 # Type checking
9759 - repo : https://github.com/pre-commit/mirrors-mypy
0 commit comments