forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpyproject.toml
61 lines (57 loc) · 1.63 KB
/
pyproject.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
59
60
61
# SPDX-FileCopyrightText: 2024 Scott Shawcroft for Adafruit Industries
#
# SPDX-License-Identifier: MIT
[tool.setuptools_scm]
# can be empty if no extra settings are needed, presence enables setuptools-scm
# Ruff settings copied from MicroPython
[tool.ruff]
target-version = "py37"
line-length = 99
# Exclude third-party code from linting and formatting. Ruff doesn't know how to ignore submodules.
# Exclude the following tests:
# repl_: not real python files
# viper_args: uses f(*)
extend-exclude = [
"extmod/ulab",
"frozen",
"lib",
"ports/analog/msdk",
"ports/atmel-samd/asf4",
"ports/broadcom/peripherals",
"ports/espressif/esp-idf",
"ports/espressif/esp-protocols",
"ports/raspberrypi/sdk",
"ports/silabs/gecko_sdk",
"ports/silabs/tools/slc_cli_linux",
"ports/stm/st_driver",
"tests/*/repl_*.py",
"tests/micropython/viper_args.py",
"tools/adabot",
"tools/bitmap_font",
"tools/cc1",
"tools/huffman",
"tools/msgfmt.py",
"tools/python-semver",
"tools/uf2",
]
# Exclude third-party code, and exclude the following tests:
# basics: needs careful attention before applying automatic formatting
format.exclude = [ "tests/basics/*.py" ]
lint.extend-select = [ "C9", "PLC" ]
lint.ignore = [
"E401",
"E402",
"E722",
"E731",
"E741",
"F401",
"F403",
"F405",
"PLC1901",
]
# manifest.py files are evaluated with some global names pre-defined
lint.per-file-ignores."**/manifest.py" = [ "F821" ]
lint.per-file-ignores."ports/**/boards/**/manifest_*.py" = [ "F821" ]
# Exclude all tests from linting (does not apply to formatting).
lint.per-file-ignores."tests/**/*.py" = [ "ALL" ]
lint.mccabe.max-complexity = 40