-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy path.ruff.toml
More file actions
46 lines (40 loc) · 1.11 KB
/
Copy path.ruff.toml
File metadata and controls
46 lines (40 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# https://github.com/charliermarsh/ruff
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"web", # webpy
]
# Enable flake8-bugbear (`B`) rules.
lint.select = ["E", "F", "B"]
# B904 Within an except clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
# B905 `zip()` without an explicit `strict=` parameter
# E402 Module level import not at top of file
# E501 line length violations
# E722 Do not use bare `except`
lint.ignore = ["B904", "B905", "E402", "E501", "E722"]
# Avoid trying to fix flake8-bugbear (`B`) violations.
lint.unfixable = ["B"]
# Ignore `E402` (import violations) in all `__init__.py` files, and in `path/to/file.py`.
#[per-file-ignores]
#"__init__.py" = ["E402"]
#"path/to/file.py" = ["E402"]
cache-dir = "~/.ruff/cache"