starter-kit/pyproject.toml
Martin Pitt 9e2eb78987 pyproject.toml: fix our mypy setup
This allows proper typechecking in testcases via LSP servers.

Based on d9c625814f
2024-06-20 10:44:55 +02:00

69 lines
1.6 KiB
TOML

[tool.mypy]
follow_imports = 'silent' # https://github.com/python-lsp/pylsp-mypy/issues/81
scripts_are_modules = true # allow checking all scripts in one invocation
explicit_package_bases = true
mypy_path = 'test/common:test:bots'
exclude = [
"bots"
]
[[tool.mypy.overrides]]
ignore_missing_imports = true
module = [
# run without bots checked out
"machine.*",
"testvm",
# run without gobject-introspection
"gi.*",
]
[tool.ruff]
exclude = [
".git/",
"modules/",
"node_modules/",
]
line-length = 118
src = []
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D300", # pydocstyle: Forbid ''' in docstrings
"E", # pycodestyle
"EXE", # flake8-executable
"F", # pyflakes
"FBT", # flake8-boolean-trap
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"PLE", # pylint errors
"PGH", # pygrep-hooks
"RSE", # flake8-raise
"RUF", # ruff rules
"T10", # flake8-debugger
"TCH", # flake8-type-checking
"UP032", # f-string
"W", # warnings (mostly whitespace)
"YTT", # flake8-2020
]
ignore = [
"FBT002", # Boolean default value in function definition
"FBT003", # Boolean positional value in function call
]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
[tool.ruff.lint.isort]
known-first-party = ["cockpit"]
[tool.vulture]
ignore_names = [
"test[A-Z0-9]*",
]