forked from eclipse-score/score
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
63 lines (51 loc) · 1.75 KB
/
pyproject.toml
File metadata and controls
63 lines (51 loc) · 1.75 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
# This file is at the root level, as it applies to all Python code,
# not only to docs or to tools.
[tool.pyright]
typeCheckingMode = "standard"
pythonVersion = "3.12" # Keep in sync with MODULE.bazel
# Warn if function parameters lack type annotations
reportMissingParameterType = "warning"
# Warn if generic types (e.g. List) are missing type args
reportMissingTypeArgument = "warning"
# Warn when using members marked as private (e.g. _log)
reportPrivateUsage = "warning"
# Warn when variable type can't be inferred or is 'Any'
reportUnknownVariableType = "warning"
# Warn about declared but unused variables
reportUnusedVariable = "warning"
exclude = [
"**/__pycache__",
"**/.*",
"bazel-*",
]
[tool.ruff]
target-version = "py312" # Keep in sync with MODULE.bazel
extend-exclude = [
"__pycache__",
".*",
"bazel-*",
]
# Selected rules for clean code, readability, and bug prevention
lint.select = [
"E", # pycodestyle (PEP8)
"F", # pyflakes (undefined vars, unused imports)
"I", # isort (import sorting)
"B", # flake8-bugbear (likely bugs)
"C90", # mccabe (complexity checks)
"UP", # pyupgrade (modern Python 3.12+ features)
"SIM", # flake8-simplify (simplifies code patterns)
"RET" # flake8-return (consistent return statements)
]
lint.ignore = [
# Rules we want to ignore go in here.
# Always provide a comment explaining why.
]
[tool.pytest.ini_options]
# Not our problem... hide the warnings!
filterwarnings = [
# Most warnings are from sphinx-needs, which we don't control.
"ignore::DeprecationWarning:sphinx_needs.*",
# One warning is from some s* library, however it's not clear which one.
# "s[a-z]" doesn't match. Only "s*" works.
"ignore::DeprecationWarning:s*.*",
]