-
Notifications
You must be signed in to change notification settings - Fork 26
/
pyproject.toml
58 lines (52 loc) · 1.66 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
[tool.ruff]
# Line length (Black default)
line-length = 88
# Python target version
target-version = "py38"
# Ignored rules for the entire project
[tool.ruff.lint]
ignore = [
"E501", # Line too long
"E203", # Whitespace before ':'
# "TRY301", # Raise within try block (this is actually a good practice)
# "W503" # Line break before binary operator (not PEP8 enforced, so not implemented in Ruff)
]
# flake8 plugins to enable:
# - flake8-bugbear B
# - flake8-builtins A
# - flake8-comprehensions C4
# - flake8-debugger T10
# - flake8-logging-format G
# - pep8-naming N
# - pyflakes F
# - tryceratops TRY
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"G", # flake8-logging-format
"N", # pep8-naming
"F", # pyflakes
"TRY", # tryceratops
"I", # isort
"E", # pycodestyle errors
"UP", # pyupgrade
]
# Per-file rule ignores
[tool.ruff.lint.per-file-ignores]
# Trailing whitespace in comment
"binder/ipython_config.py" = ["E266"]
# suppress `raise ... from err`
# Why we ignore B904 from the object-oriented tests?
# We do want to raise an assertion error if the check on the solution function attributes fails,
# but Python by default will raise a TypeError via vars(solution_result)
# if the result is not a class and therefore doesn't have a __dict__ attribute.
"tutorial/tests/test_object_oriented_programming.py" = ["B904"]
# Ruff formatting
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
# pytest
[tool.pytest.ini_options]
addopts = "-v --tb=short"