-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy pathpyproject.toml
More file actions
68 lines (62 loc) · 1.92 KB
/
pyproject.toml
File metadata and controls
68 lines (62 loc) · 1.92 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[project]
requires-python = ">=3.11"
[tool.autopep8]
max_line_length = 132
[tool.isort]
line_length = 132
known_first_party = "matter"
[tool.ruff]
line-length = 132
target-version = "py311"
exclude = [
".*",
"out",
"scripts/py_matter_yamltests/build",
"scripts/py_matter_idl/build",
"src/python_testing/matter_testing_infrastructure/build",
# Exclude submodules since we do not maintain them
# TODO: Use exact paths once we will have a way to sync and validate them in CI
"examples/common/QRCode/repo",
"examples/common/m5stack-tft/repo",
"third_party",
# TODO(#37698)
"docs/development_controllers/matter-repl/*.ipynb",
]
[tool.pyright]
reportMissingTypeStubs = "warning"
[tool.ruff.lint]
select = [
# Standard errors and warnings
"E", "PLE", "W", "F",
# Ensure that async is used properly
"ASYNC",
# Consistent commas
"COM",
# Simplify the code if possible
"C4", "RET", "SIM",
# Ensure that scripts are executable
"EXE",
# Check for common exception issues
"RSE",
# Check for common logging issues
"LOG",
# Check for common optimization issues
"SLOT",
]
ignore = [
"ASYNC109", # Sometimes we use "timeout" argument in async functions
"ASYNC230", # Allow open() calls in async functions
"COM812", # Do not enforce trailing commas in multi-line collections for now
"SIM102", # Nested if statements can be more readable in some cases
"SIM108", # Do not enforce ternary operator in place of if/else blocks
"SIM114", # Separate if statements can be more readable in some cases
"SIM905", # Sometimes using "command arg1 arg2".split() is more readable
"E501", # Do not report line length issues (formatter should handle this)
"E721", # We use it for good reasons
]
[tool.mypy]
mypy_path = ["matter/typings"]
namespace_packages = true
warn_unused_configs = true
ignore_missing_imports = true
explicit_package_bases = true