blob: 3dc66100ee133a8e6110aaae728210220b21f35d [file] [edit]
[project]
name = 'emsdk'
requires-python = ">=3.10"
[tool.ruff]
preview = true
line-length = 100
indent-width = 2
exclude = [
".git",
]
lint.select = [
"ARG",
"ASYNC",
"B",
"C4",
"C90",
"COM",
"E",
"F",
"I",
"PERF",
"PIE",
"PL",
"UP",
"W",
"RUF",
"YTT",
]
lint.external = [ "D" ]
lint.ignore = [
"assert-false", # See https://github.com/PyCQA/flake8-bugbear/issues/66
"function-uses-loop-variable",
"star-arg-unpacking-after-keyword-arg",
"module-import-not-at-top-of-file",
"line-too-long",
"type-comparison",
"ambiguous-variable-name",
"indentation-with-invalid-multiple", # Does not seem to honor `indent-width = 2` above
"indentation-with-invalid-multiple-comment", # Does not seem to honor `indent-width = 2` above
"try-except-in-loop",
"manual-list-comprehension",
"import-outside-top-level",
"too-many-public-methods",
"too-many-statements",
"too-many-boolean-expressions",
"too-many-nested-blocks",
"redefined-argument-from-local",
"collapsible-else-if",
"no-self-use",
"global-variable-not-assigned",
"global-statement",
"too-many-locals",
"subprocess-run-without-check",
"unspecified-encoding",
"redefined-loop-name",
"unraw-re-pattern", # https://docs.astral.sh/ruff/rules/unraw-re-pattern/
"format-literals", # TODO
"printf-string-formatting", # TODO
"f-string", # TODO
"too-many-statements-in-try-clause",
]
lint.per-file-ignores."emrun.py" = [ "misplaced-bare-raise" ]
lint.per-file-ignores."tools/ports/*.py" = [ "unused-function-argument", "unused-lambda-argument" ]
lint.per-file-ignores."test/other/ports/*.py" = [ "unused-function-argument" ]
lint.per-file-ignores."test/parallel_testsuite.py" = [ "unused-method-argument" ]
lint.per-file-ignores."test/test_benchmark.py" = [ "unused-method-argument" ]
lint.mccabe.max-complexity = 51 # Recommended: 10
lint.pylint.allow-magic-value-types = [
"bytes",
"float",
"int",
"str",
]
lint.pylint.max-args = 15 # Recommended: 5
lint.pylint.max-branches = 50 # Recommended: 12
lint.pylint.max-returns = 16 # Recommended: 6
lint.pylint.max-statements = 142 # Recommended: 50