forked from beancount/fava
-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
81 lines (70 loc) · 2.68 KB
/
pyproject.toml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
[tool.black]
line-length = 79
preview = true
[tool.mypy]
mypy_path = "stubs"
strict = true
[tool.pylint.'messages control']
disable = [
"too-few-public-methods",
"too-many-branches",
"too-many-instance-attributes",
"invalid-unary-operand-type", # type-checking like, had false-positives
"not-an-iterable", # type-checking like, had false-positives
"unsubscriptable-object", # type-checking like, had false-positives
"broad-except", # is checked by ruff (BLE)
"too-many-return-statements", # is checked by ruff (PLR0911)
"too-many-arguments", # is checked by ruff (PLR0913)
"redefined-builtin", # is checked by ruff (A002)
"protected-access", # is checked by ruff (SLF001)
"invalid-name", # is checked by ruff (N)
"missing-docstring", # is checked by ruff (D)
]
[tool.pytest.ini_options]
filterwarnings = "ignore:.*locked_cached_property.*deprecated:DeprecationWarning"
[tool.ruff]
target-version = "py38"
extend-select = [
"ALL",
]
extend-ignore = [
"A003", # allow class attributes to shadow builtins
"ANN101", # allow `self` to be untyped
"ANN401", # allow `typing.Any`
"C901", # ignore mccabe complecity for now
"D102", # allow undocumented methods
"D105", # allow magic methods to be undocumented
"D107", # allow __init__ to be undocumented - the class should be.
"DTZ", # allow naive dates (for now)
"EM101", # allow long strings as error messages
"EM102", # allow f-strings as error messages
"FBT", # allow boolean positional arguments (for now)
"PD", # pandas-related, has false-positives
"PERF203", # allow try-except in loop; zero-cost since Python 3.11
"PLR2004", # allow magic constants in comparisons
"TRY003", # allow long string constants as error messages
]
[tool.ruff.flake8-type-checking]
strict = true # always move type-only imports to TYPE_CHECKING-if blocks
[tool.ruff.isort]
force-single-line = true
order-by-type = false
known-first-party = ["fava"]
required-imports = ["from __future__ import annotations"]
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.pylint]
max-args = 9
[tool.ruff.per-file-ignores]
"contrib/**" = ["D", "INP"]
"docs/**" = ["D", "ANN", "INP"]
"tests/conftest.py" = ["S101"]
"tests/test_*.py" = ["D", "S101"]
"tests/data/import_config.py" = ["ANN", "INP"]
"src/fava/ext/portfolio_list/__init__.py" = ["ANN"]
"stubs/**" = ["D"]
"src/fava/core/filters.py" = ["D"]