1+ [tool .isort ]
2+ profile = " black"
3+
4+ [tool .ruff ]
5+ line-length = 99
6+ target-version = " py37"
7+
8+ [tool .ruff .lint ]
9+ select = [
10+ " ASYNC" , # flake8-comprehensions
11+ " C4" , # flake8-comprehensions
12+ " C90" , # McCabe cyclomatic complexity
13+ " DTZ" , # flake8-datetimez
14+ " E" , # pycodestyle
15+ " EXE" , # flake8-executable
16+ " F" , # Pyflakes
17+ " G" , # flake8-logging-format
18+ " ICN" , # flake8-import-conventions
19+ " INT" , # flake8-gettext
20+ " ISC" , # flake8-implicit-str-concat
21+ " PGH" , # pygrep-hooks
22+ " PIE" , # flake8-pie
23+ " PL" , # Pylint
24+ " PYI" , # flake8-pyi
25+ " RSE" , # flake8-raise
26+ " RUF" , # Ruff-specific rules
27+ " T10" , # flake8-debugger
28+ " TCH" , # flake8-type-checking
29+ " W" , # pycodestyle
30+ " YTT" , # flake8-2020
31+ # "A", # flake8-builtins
32+ # "ANN", # flake8-annotations
33+ # "ARG", # flake8-unused-arguments
34+ # "B", # flake8-bugbear
35+ # "BLE", # flake8-blind-except
36+ # "COM", # flake8-commas
37+ # "D", # pydocstyle
38+ # "DJ", # flake8-django
39+ # "EM", # flake8-errmsg
40+ # "ERA", # eradicate
41+ # "FBT", # flake8-boolean-trap
42+ # "I", # isort
43+ # "INP", # flake8-no-pep420
44+ # "N", # pep8-naming
45+ # "NPY", # NumPy-specific rules
46+ # "PD", # pandas-vet
47+ # "PT", # flake8-pytest-style
48+ # "PTH", # flake8-use-pathlib
49+ # "Q", # flake8-quotes
50+ # "RET", # flake8-return
51+ # "S", # flake8-bandit
52+ # "SIM", # flake8-simplify
53+ # "SLF", # flake8-self
54+ # "T20", # flake8-print
55+ # "TID", # flake8-tidy-imports
56+ # "TRY", # tryceratops
57+ # "UP", # pyupgrade
58+ ]
59+ ignore = [
60+ " E722" ,
61+ " E741" , # 'l' is currently widely used
62+ " F401" ,
63+ " F403" ,
64+ " F405" ,
65+ " E501" , # line length, recommended to disable
66+ " ISC001" ,
67+ " ISC003" , # micropython does not support implicit concatenation of f-strings
68+ " PIE810" , # micropython does not support passing tuples to .startswith or .endswith
69+ " PLC1901" ,
70+ " PLR1704" , # sometimes desirable to redefine an argument to save code size
71+ " PLR1714" ,
72+ " PLR5501" ,
73+ " PLW0602" ,
74+ " PLW0603" ,
75+ " PLW2901" ,
76+ " RUF012" ,
77+ " RUF100" ,
78+ " SIM101" ,
79+ " W191" , # tab-indent, redundant when using formatter
80+ ]
81+
82+ [tool .ruff .lint .mccabe ]
83+ max-complexity = 61
84+
85+ [tool .ruff .lint .pylint ]
86+ allow-magic-value-types = [" bytes" , " int" , " str" ]
87+ max-args = 14
88+ max-branches = 58
89+ max-returns = 13
90+ max-statements = 166
91+
92+ [tool .ruff .lint .per-file-ignores ]
93+ # manifest.py files are evaluated with some global names pre-defined
94+ "**/manifest.py" = [" F821" ]
95+
96+ [tool .ruff .format ]
97+ # Like Black, use double quotes for strings.
98+ quote-style = " double"
99+
100+ # Like Black, indent with spaces, rather than tabs.
101+ indent-style = " space"
102+
103+ # Like Black, respect magic trailing commas.
104+ skip-magic-trailing-comma = false
105+
106+ # Like Black, automatically detect the appropriate line ending.
107+ line-ending = " auto"
0 commit comments