/
pyproject.toml
62 lines (56 loc) · 1.98 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
[tool.isort]
profile = "black"
src_paths = ["python/src", "python/test"]
line_length = 120
[tool.black]
src-paths = ["python/src", "python/test"]
line-length = 120
[tool.pylint]
max-line-length = 120
max-attributes = 10
disable = """
fixme,
missing-class-docstring,
missing-function-docstring,
missing-module-docstring,
too-few-public-methods,
"""
[tool.ruff]
src = ["python/src", "python/test"]
target-version = "py311"
lint.select = ["ALL"]
lint.ignore = [
"D212",
"D400",
"D407",
"D406", # I like the colon after a DocString section title
"D203", # I don't like this style, D211 is the alternate
"D205", # For now, the DocStrings only have a description, no single-line summary
"D413", # Blank line at the end of a DocString is a silly style
"UP007", # Optional[X] is a valid type specification
"ANN101", # "self" doesn't need a type annotation
"ANN102", # "cls" doesn't need a type annotation
"PT009", # regular asserts are fine in some cases but not in others, using x.assert*() is beter for consistency
"FIX002", # TODO's are ok to have
"TD003", # Issue links aren't a thing in this project, we don't need them after TODOs
"PTH123", # I think Path.open and open are both fine
"ERA001", # This rule is fine but it has a lot of false positives e.g. "Forearms (Anterior)" triggers it
"PD901", # I'm a fan of generic names for generic functionality
# Ruff recommends ignoring these
"COM812",
"ISC001",
]
line-length = 120
[tool.ruff.lint.pylint]
max-args = 10
[tool.ruff.lint.per-file-ignores]
"python/test/*" = [
"S311", # Ignore cryptographic warnings in test files -- they don't need to be crypographically secure
"SLF001", # Tests are allowed to access private members
"D100", # Don't bother with DocString requirements for test modules/packages
"D101",
"D104",
]
"python/src/exercise_log/run_updater.py" = [
"T201", # The updater is a CLI, it's meant to print to console
]