Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
56 lines (46 loc) · 2.15 KB
/
Copy pathpyproject.toml
File metadata and controls
56 lines (46 loc) · 2.15 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
[tool.ruff]
# settings applying to all ruff subcommands, such as `ruff check` (lint) and `ruff format`
line-length = 120
target-version = "py310"
exclude = ["*/.venv/*"]
[tool.ruff.lint]
select = ["ALL"]
# all rules: https://beta.ruff.rs/docs/rules
ignore = [
# some ruff checking modules don't make much sense as a whole
"D", # pydocstyle: pretty strict anyways
"FBT", # flake8-boolean-trap: boolean arguments can make sense
"COM", # flake8-commas: formatter takes care of this
"DTZ", # flake8-datetimez: utc datetimes are useful
"DJ", # flake8-django: not needed
"EM", # flake8-errmsg: str directly in Exception constructor is accetable
"TCH", # flake8-type-checking: type checking blocks are weird
# specific rules
"ANN401", # any-type: allow Any in *args and **kwargs
"S101", # assert: allow usage of assert
"B008", # function-call-argument-default: some default argument values make sense to be function calls
"G004", # logging-f-string: allow usage of f-strings in logging calls
"PLR2004", # magic-value-comparison: sometimes comparison with constants (e.g. 0) makes sense
"TRY003", # raise-vanilla-args: exceptions like this make sense in python
"TRY400", # error-instead-of-exception: logger.error is ok with loguru
# disabled because of formatter
"E501", # line-too-long -> formatter takes care of this
"ISC001", # single-line-implicit-str-concatenation -> formatter takes care of this
"Q", # flake8-quotes -> formatter takes care of this
"W191", # tab-indentation -> formatter takes care of this
]
unfixable = [
"F841", # unused-variable -> don't remove them automatically
"ERA", # eradicate -> (commented out code), don't remove it automatically
]
[tool.ruff.lint.isort]
known-first-party = ["vci_workflow"]
[tool.ruff.lint.per-file-ignores]
"*/tests/*" = ["INP001", "SLF001"]
[tool.pyright]
exclude = ["**/.ipynb_checkpoints", "**/__pycache__", ".venv"]
# pyright needs to have all the dependencies installed to be able to type check
# we can make sure of this by telling it to use the uv venv
venvPath = "."
venv = ".venv"
reportPrivateImportUsage = false