Skip to content

Commit a714344

Browse files
committed
add: new ruff rules
1 parent fcc6ffc commit a714344

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

.vscode/settings.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
22
"[python]": {
33
"editor.formatOnSave": true,
4-
"editor.defaultFormatter": "charliermarsh.ruff"
4+
"editor.defaultFormatter": "charliermarsh.ruff",
5+
"editor.codeActionsOnSave": {
6+
"source.fixAll.ruff": "explicit"
7+
}
58
},
69
"ruff.configurationPreference": "filesystemFirst",
710
"ruff.configuration": "${workspaceFolder}/ruff.toml",
8-
}
11+
}

ruff.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ line-length = 88
3333
indent-width = 4
3434

3535
[lint]
36-
# Enable errors, failures, organaize imports and fastapi.
37-
select = ["E", "F", "I", "FAST"]
36+
# Enable errors, failures, organize imports, warnings, naming conventions,
37+
# pyupgrade, bugbear and simplify rules.
38+
select = ["E", "F", "I", "W", "N", "UP", "B", "SIM"]
3839
# Allow fix for all enabled rules (when `--fix`) is provided.
3940
fixable = ["ALL"]
40-
# Ignore long line errors.
41-
ignore = ["E501"]
41+
# Ignore long line errors and FastAPI Depends() false positives.
42+
ignore = ["E501", "B008"]
4243

4344
[format]
4445
# Like Black, use double quotes for strings.

0 commit comments

Comments
 (0)