Skip to content

Commit 812f09d

Browse files
committed
Update outdated linters and settings
1 parent 60fc3be commit 812f09d

3 files changed

Lines changed: 9 additions & 29 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,9 @@ repos:
1414
- id: debug-statements
1515
- id: fix-byte-order-marker
1616
- id: detect-private-key
17-
- repo: https://github.com/psf/black
18-
rev: 23.11.0
19-
hooks:
20-
- id: black
2117
- repo: https://github.com/astral-sh/ruff-pre-commit
2218
rev: v0.1.5
2319
hooks:
2420
- id: ruff
2521
args: [--fix, --exit-non-zero-on-fix]
26-
- repo: https://github.com/pycqa/isort
27-
rev: 5.12.0
28-
hooks:
29-
- id: isort
30-
default_language_version:
31-
python: python3.11
22+
- id: ruff-format

.vscode/settings.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
"files.trimFinalNewlines": true,
44
"files.insertFinalNewline": true,
55
"editor.formatOnSave": true,
6-
"python.linting.enabled": true,
7-
"python.linting.mypyEnabled": true,
86
"editor.codeActionsOnSave": {
9-
"source.fixAll": true, // Apply Ruff fixes
7+
"source.fixAll": "always"
108
},
119
"editor.rulers": [
1210
120
1311
],
1412
"[python]": {
15-
"editor.defaultFormatter": "ms-python.black-formatter"
13+
"editor.defaultFormatter": "charliermarsh.ruff"
1614
},
1715
"cSpell.words": [
1816
"isort",

pyproject.toml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
# Project configuiration options for Python tools.
2-
[tool.black] # https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
3-
target-version = ["py311"]
4-
line-length = 120
5-
6-
[tool.isort] # https://pycqa.github.io/isort/docs/configuration/options.html
7-
py_version = "311"
8-
line_length = 120
9-
profile = "black"
10-
skip_gitignore = true
11-
122
[tool.mypy] # https://mypy.readthedocs.io/en/stable/config_file.html
133
python_version = "3.11"
144
files = ["."]
@@ -27,8 +17,11 @@ warn_return_any = true
2717
no_implicit_reexport = true
2818
strict_equality = true
2919

30-
[tool.ruff]
31-
# https://beta.ruff.rs/docs/rules/
20+
[tool.ruff] # https://docs.astral.sh/ruff/rules/
21+
line-length = 120
22+
target-version = "py311"
23+
24+
[tool.ruff.lint]
3225
select = [
3326
"C90", # mccabe
3427
"D", # pydocstyle
@@ -65,8 +58,6 @@ ignore = [
6558
"S311", # suspicious-non-cryptographic-random-usage
6659
"PLR0913", # too-many-arguments
6760
]
68-
line-length = 120
69-
target-version = "py311"
7061

71-
[tool.ruff.pydocstyle] # https://beta.ruff.rs/docs/settings/#pydocstyle
62+
[tool.ruff.pydocstyle] # https://docs.astral.sh/ruff/settings/#lintpydocstyle
7263
convention = "google"

0 commit comments

Comments
 (0)