-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
81 lines (72 loc) · 2.1 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>=1.2"]
build-backend = "setuptools.build_meta"
[tool.mypy]
python_version = "3.7"
ignore_missing_imports = true
exclude = ["public"]
[tool.ruff]
line-length = 100
target-version = "py37"
respect-gitignore = true
extend-include = ["*.ipynb"]
output-format = "grouped"
[tool.ruff.format]
quote-style = "single"
[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", "W", # pycodestyle
"C90", # mccabe
"I", # isort
"D", # pydocstyle
"UP", # pyupgrade
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"FA", # flake8-future-annotations
"ICN", # flake8-import-conventions
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"PL", # Pylint
"NPY", # NumPy-specific rules
"PERF", # Perflint
"LOG", # flake8-logging
"RUF" # Ruff-specific rules
]
ignore = [
# E741, E743: Ambiguous variable and function names
# eminus uses, e.g., l (quantum number) as variables or O (overlap operator) as functions
"E741", "E743",
# S101: Use of `assert` detected
# This should not introduce a security issue for us
"S101",
# SIM108: Use ternary operator instead of `if`-`else`-block
# if-else blocks should be written down explicitly
"SIM108",
# PLR0911: Too many return statements
# PLR0912: Too many branches
# PLR0913: Too many arguments to function call
# PLR2004: Magic value used in comparison
# These rules feel too restrictive for now
"PLR0911", "PLR0912", "PLR0913", "PLR2004"
]
[tool.ruff.lint.per-file-ignores]
"examples/*" = [
# D100, D103: Missing docstring in public module or function
"D100", "D103",
# E501: Line too long
"E501"
]
[tool.ruff.lint.isort]
force-sort-within-sections = true
order-by-type = false
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.pydocstyle]
convention = "google"