-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ruff.toml
59 lines (41 loc) · 1.44 KB
/
.ruff.toml
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
47
48
49
50
51
52
53
54
55
56
57
58
# https://docs.astral.sh/ruff/settings/
# Exclude a variety of commonly ignored directories.
exclude = [
".eggs",
".git",
"__pycache__"
]
line-length = 88
select = ['E', 'F', 'W']
ignore = ["E203"]
# Assume Python 3.7
target-version = "py37"
[per-file-ignores]
# tests often manipulate sys.path before importing the main tools, so ignore import order violations
"test/*.py" = ["E402"]
# multiple spaces after ',' and long lines - used for visual layout of eFuse data
"espefuse/efuse/*/mem_definition.py" = ["E241", "E501"]
"espefuse/efuse/*/operations.py" = ["E241", "E501", "F401"]
"espefuse/efuse/*/fields.py" = ["E241", "E501"]
# ignore long lines - used for RS encoding pairs
"test/test_modules.py" = ["E501"]
# don't check for unused imports in __init__.py files
"__init__.py" = ["F401"]
# allow definition from star imports in docs config
"docs/conf_common.py" = ["F405"]
[lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F"]
ignore = []
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# ruff-format hook configuration
[format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true