File tree 6 files changed +52
-72
lines changed
6 files changed +52
-72
lines changed Original file line number Diff line number Diff line change 1
1
# # Pre-commit setup
2
2
# See https://github.com/python-discord/code-jam-template/tree/main#pre-commit-run-linting-before-committing
3
3
4
- # Make sure to edit the `additional_dependencies` list if you want to add plugins
5
-
6
4
repos :
7
5
- repo : https://github.com/pre-commit/pre-commit-hooks
8
6
rev : v4.5.0
@@ -13,19 +11,8 @@ repos:
13
11
- id : trailing-whitespace
14
12
args : [--markdown-linebreak-ext=md]
15
13
16
- - repo : https://github.com/pre-commit/pygrep-hooks
17
- rev : v1.5.1
18
- hooks :
19
- - id : python-check-blanket-noqa
20
-
21
- - repo : https://github.com/PyCQA/isort
22
- rev : 5.12.0
23
- hooks :
24
- - id : isort
25
-
26
- - repo : https://github.com/pycqa/flake8
27
- rev : 4.0.1
14
+ - repo : https://github.com/astral-sh/ruff-pre-commit
15
+ rev : v0.3.5
28
16
hooks :
29
- - id : flake8
30
- additional_dependencies :
31
- - flake8-docstrings~=1.6.0
17
+ - id : ruff
18
+ - id : ruff-format
Original file line number Diff line number Diff line change
1
+ [tool .ruff ]
2
+ # Increase the line length. This breaks PEP8 but it is way easier to work with.
3
+ # The original reason for this limit was a standard vim terminal is only 79 characters,
4
+ # but this doesn't really apply anymore.
5
+ line-length = 119
6
+ # Target Python 3.12. If you decide to use a different version of Python
7
+ # you will need to update this value.
8
+ target-version = " py312"
9
+ # Automatically fix auto-fixable issues.
10
+ fix = true
11
+ # The directory containing the source code. If you choose a different project layout
12
+ # you will need to update this value.
13
+ src = [" src" ]
14
+
15
+ [tool .ruff .lint ]
16
+ # Enable all linting rules.
17
+ select = [" ALL" ]
18
+ # Ignore some of the most obnoxious linting errors.
19
+ ignore = [
20
+ # Missing docstrings.
21
+ " D100" ,
22
+ " D104" ,
23
+ " D105" ,
24
+ " D106" ,
25
+ " D107" ,
26
+ # Docstring whitespace.
27
+ " D203" ,
28
+ " D213" ,
29
+ # Docstring quotes.
30
+ " D301" ,
31
+ # Builtins.
32
+ " A" ,
33
+ # Print statements.
34
+ " T20" ,
35
+ # TODOs.
36
+ " TD002" ,
37
+ " TD003" ,
38
+ " FIX" ,
39
+ # Annotations.
40
+ " ANN101" ,
41
+ " ANN102" ,
42
+ ]
Original file line number Diff line number Diff line change 2
2
# Don't forget to pin your dependencies!
3
3
# This list will have to be migrated if you wish to use another dependency manager.
4
4
5
- # Base tools
6
- flake8~=4.0.1
7
- isort~=5.10.1
8
- pre-commit~=2.17.0
9
-
10
- # Flake8 plugins, see https://github.com/python-discord/code-jam-template/tree/main#plugin-list
11
- flake8-docstrings~=1.6.0
5
+ ruff ~= 0.3.5
6
+ pre-commit ~= 3.7.0
Original file line number Diff line number Diff line change @@ -6,13 +6,8 @@ name = "pypi"
6
6
[packages ]
7
7
8
8
[dev-packages ]
9
- # Base tools
10
- flake8 = " ~=4.0.1"
11
- isort = " ~=5.12.0"
12
- pre-commit = " ~=2.17.0"
13
-
14
- # Flake8 plugins, see https://github.com/python-discord/code-jam-template/tree/main#plugin-list
15
- flake8-docstrings = " ~=1.6.0"
9
+ ruff = " ~=0.3.5"
10
+ pre-commit = " ~=3.7.0"
16
11
17
12
[requires ]
18
13
python_version = " 3.10"
Original file line number Diff line number Diff line change @@ -9,14 +9,8 @@ license = "MIT"
9
9
python = " 3.10.*"
10
10
11
11
[tool .poetry .dev-dependencies ]
12
- # Base tools
13
- flake8 = " ~4.0.1"
14
- isort = " ~5.12.0"
15
- pre-commit = " ~2.17.0"
16
-
17
- # Flake8 plugins, see https://github.com/python-discord/code-jam-template/tree/main#plugin-list
18
- flake8-docstrings = " ~1.6.0"
19
-
12
+ ruff = " ~0.3.5"
13
+ pre-commit = " ~3.7.0"
20
14
21
15
[build-system ]
22
16
requires = [" poetry-core>=1.0.0" ]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments