blob: 033facf25fe1995b14e417665da5035f71d002d6 [file] [log] [blame]
[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 = [
".environment",
".git",
".github",
".*",
"build",
"out",
"third_party",
"examples/common/QRCode/",
# TODO(#37698)
"docs/development_controllers/matter-repl/*.ipynb",
]
[tool.ruff.lint]
select = [
# Standard errors and warnings
"E", "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 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
]