forked from internetarchive/openlibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
126 lines (117 loc) · 2.94 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# NOTE: You have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.
[tool.black]
skip-string-normalization = true
target-version = ["py310", "py311"]
[tool.codespell]
ignore-words-list = "beng,curren,datas,furst,nd,nin,ot,ser,spects,te,tha,ue,upto"
skip = "./.*,*/ocm00400866,*/read_toc.py,*.it,*.js,*.json,*.mrc,*.page,*.pg_dump,*.po,*.txt,*.xml,*.yml"
[tool.mypy]
ignore_missing_imports = true
pretty = true
scripts_are_modules = true
show_error_codes = true
show_error_context = true
exclude = "(vendor*|venv*)/$"
[[tool.mypy.overrides]]
module = [
"infogami.*",
"openlibrary.plugins.worksearch.code"
]
ignore_errors = true
[tool.pytest.ini_options]
asyncio_mode = "strict"
[tool.ruff]
exclude = [
"./.*",
"node_modules/*",
"vendor/*",
]
ignore = [
"C408",
"E402",
"E722",
"E741",
"F401",
"F841",
"I",
"PIE790",
"PIE804",
"PLC1901",
"RSE102",
"SIM102",
"SIM105",
"SIM108",
"SIM115",
"SIM300",
"SLF001",
"UP007",
"UP031",
"UP035",
"UP038",
]
line-length = 162
select = [
"C4", # flake8-comprehensions
"C90", # McCabe cyclomatic complexity
"E", # pycodestyle
"F", # Pyflakes
"G010", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INT", # flake8-gettext
"PIE", # flake8-pie
"PLC", # Pylint conventions
"PLE", # Pylint errors
"PLR091", # Pylint Refactor just for max-args, max-branches, etc.
"PYI", # flake8-pyi
"RSE", # flake8-raise
"SIM", # flake8-simplify
"SLF", # flake8-self
"T10", # flake8-debugger
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
# "A", # flake8-builtins
# "ANN", # flake8-annotations
# "ARG", # flake8-unused-arguments
# "B", # flake8-bugbear
# "BLE", # flake8-blind-except
# "COM", # flake8-commas
# "D", # pydocstyle
# "DJ", # flake8-django
# "DTZ", # flake8-datetimez
# "EM", # flake8-errmsg
# "ERA", # eradicate
# "EXE", # flake8-executable
# "FBT", # flake8-boolean-trap
# "G", # flake8-logging-format
# "INP", # flake8-no-pep420
# "ISC", # flake8-implicit-str-concat
# "N", # pep8-naming
# "NPY", # NumPy-specific rules
# "PD", # pandas-vet
# "PGH", # pygrep-hooks
# "PT", # flake8-pytest-style
# "PTH", # flake8-use-pathlib
# "Q", # flake8-quotes
# "RET", # flake8-return
# "RUF", # Ruff-specific rules
# "S", # flake8-bandit
# "T20", # flake8-print
# "TCH", # flake8-type-checking
# "TID", # flake8-tidy-imports
# "TRY", # tryceratops
]
target-version = "py311"
[tool.ruff.mccabe]
max-complexity = 41
[tool.ruff.pylint]
max-args = 15
max-branches = 42
max-returns = 14
max-statements = 106
[tool.ruff.per-file-ignores]
"tests/*" = ["S101"]