2023-03-08 05:15:25 +03:00
|
|
|
[tool.codespell]
|
|
|
|
count = ""
|
|
|
|
ignore-regex = '\b[A-Z]{3}\b'
|
2023-06-02 20:21:39 +03:00
|
|
|
ignore-words-list = "ans,asend,deques,dout,extint,hsi,iput,mis,numer,shft,technic,ure"
|
2023-03-08 05:15:25 +03:00
|
|
|
quiet-level = 3
|
|
|
|
skip = """
|
|
|
|
*/build*,\
|
|
|
|
./.git,\
|
|
|
|
./drivers/cc3100,\
|
|
|
|
./lib,\
|
|
|
|
./ports/cc3200/FreeRTOS,\
|
|
|
|
./ports/cc3200/bootmgr/sl,\
|
|
|
|
./ports/cc3200/hal,\
|
|
|
|
./ports/cc3200/simplelink,\
|
|
|
|
./ports/cc3200/telnet,\
|
|
|
|
./ports/nrf/drivers/bluetooth/s1*,\
|
|
|
|
./ports/stm32/usbhost,\
|
|
|
|
./tests,\
|
|
|
|
ACKNOWLEDGEMENTS,\
|
|
|
|
"""
|
2023-03-08 18:09:36 +03:00
|
|
|
|
|
|
|
[tool.ruff]
|
2023-10-21 09:40:27 +03:00
|
|
|
# Exclude third-party code from linting and formatting
|
|
|
|
extend-exclude = ["lib"]
|
|
|
|
line-length = 99
|
|
|
|
target-version = "py37"
|
|
|
|
|
|
|
|
[tool.ruff.lint]
|
2023-03-08 18:09:36 +03:00
|
|
|
extend-select = ["C9", "PLC"]
|
|
|
|
ignore = [
|
|
|
|
"E401",
|
|
|
|
"E402",
|
|
|
|
"E722",
|
|
|
|
"E731",
|
|
|
|
"E741",
|
|
|
|
"F401",
|
|
|
|
"F403",
|
|
|
|
"F405",
|
|
|
|
"PLC1901",
|
|
|
|
]
|
|
|
|
|
|
|
|
[tool.ruff.mccabe]
|
|
|
|
max-complexity = 40
|
|
|
|
|
|
|
|
[tool.ruff.per-file-ignores]
|
2023-10-21 09:40:27 +03:00
|
|
|
# Exclude all tests from linting (does not apply to formatting).
|
|
|
|
"tests/**/*.py" = ["ALL"]
|
2023-03-08 18:09:36 +03:00
|
|
|
"ports/cc3200/tools/uniflash.py" = ["E711"]
|
2023-08-09 11:24:29 +03:00
|
|
|
# manifest.py files are evaluated with some global names pre-defined
|
|
|
|
"**/manifest.py" = ["F821"]
|
2023-08-15 17:51:37 +03:00
|
|
|
"ports/**/boards/**/manifest_*.py" = ["F821"]
|
2023-10-21 09:40:27 +03:00
|
|
|
|
|
|
|
[tool.ruff.format]
|
|
|
|
# Exclude third-party code, and exclude the following tests:
|
|
|
|
# basics: needs careful attention before applying automatic formatting
|
|
|
|
# repl_: not real python files
|
|
|
|
# viper_args: uses f(*)
|
|
|
|
exclude = ["tests/basics/*.py", "tests/*/repl_*.py", "tests/micropython/viper_args.py"]
|