-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyroject.toml
90 lines (79 loc) · 2.87 KB
/
pyroject.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
82
83
84
85
86
87
88
89
90
[tool.black]
line-length = 88
preview = true
[tool.ruff]
# Same as Black.
line-length = 88
lint.select = [
"A", # flake8-builtins https://tinyurl.com/ruff-rules#flake8-builtins-a
"B", # Flake8-bugbear https://tinyurl.com/ruff-rules#flake8-bugbear-b
"BLE", # Flake8-blind-except https://tinyurl.com/ruff-rules#flake8-blind-except-ble
"C4", # Flake8-comprehensions https://tinyurl.com/ruff-rules#flake8-comprehensions-c4
"C90", # McCabe complexity https://tinyurl.com/ruff-rules#mccabe-c90
"D", # Pydocstyle https://tinyurl.com/ruff-rules#pydocstyle-d
"E", # Pycodestyle errors https://tinyurl.com/ruff-rules#pycodestyle-e-w
"F", # Pyflakes https://tinyurl.com/ruff-rules#pyflakes-f
"I", # Isort https://tinyurl.com/ruff-rules#isort-i
"PIE", # Flake8-pie https://tinyurl.com/ruff-rules#flake8-pie-pie
"PLR", # Pylint refactor https://tinyurl.com/ruff-rules#pylint-pl
"PTH", # Flake8-use-pathlib https://tinyurl.com/ruff-rules#flake8-use-pathlib-pth
"Q", # Flake8-quotes https://tinyurl.com/ruff-rules#flake8-quotes-q
"RSE", # Flake8-raise https://tinyurl.com/ruff-rules#flake8-raise-rse
"RUF", # Ruff-specific https://tinyurl.com/ruff-rules#ruff-specific-rules-ruf
"SIM", # Flake8-simplify https://tinyurl.com/ruff-rules#flake8-simplify-sim
"UP", # Pyupgrade https://tinyurl.com/ruff-rules#pyupgrade-up
"YTT", # Flake8-2020 https://tinyurl.com/ruff-rules#flake8-2020-ytt
]
lint.ignore = [
"D102", # Missing docstring in public method
"D107", # Missing docstring in __init__
"E501", # doctests need long lines
"PLR0912", # Too many branches in function or method
"PLR0915", # Too many statements in function or method
"PLR0913", # Too many arguments to function call
"PLR2004", # Magic value used in comparison
"RUF001", # String contains ambiguous Unicode character (curly quotes)
"RUF002", # Docstring contains ambiguous Unicode character (curly quotes)
]
lint.unfixable = [
"F401", # keep unused modules as I'm likely to use them shortly
]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"_old",
]
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.mccabe] # enabled via "C90" above
max-complexity = 10
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-r a -q --doctest-modules"
testpaths = [
"biblio", "formats", "tests"
]
filterwarnings = "ignore::DeprecationWarning"
enable_assertion_pass_hook = true
[tool.pyright]
reportMissingImports = false
reportMissingTypeStubs = false
pythonVersion = '3.12'