-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
101 lines (97 loc) · 2.57 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
[tool.ruff]
line-length = 88
builtins = ["_", "I", "P", "load_translations", "get_resources", "get_icons"]
[tool.ruff.lint]
# https://docs.astral.sh/ruff/rules/
select = [
"F", # pyflakes
"E", # pycodestyle Error
"W", # pycodestyle Warning
# "C90", # mccabe
"I", # isort
# "N", # pep8-naming
# "UP", # pyupgrade
"YTT", # flake8-2020
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"EXE", # flake8-executable
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
# "G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
# "PT", # flake8-pytest-style
# "RET", # flake8-return
# "SLF", # flake8-self
# "SIM", # flake8-simplify
"TCH", # flake8-type-checking
"ARG", # flake8-unused-arguments
# "PTH", # flake8-use-pathlib
"TD", # flake8-todos
# "ERA", # eradicate
"PGH", # pygrep-hooks
# "PLC", # Pylint Convention
"PLE", # Pylint Error
# "PLR", # Pylint Refactor
# "PLW", # Pylint Warning
"TRY", # tryceratops
"FLY", # flynt
"PERF", # Perflint
# "FURB", # refurb
"RUF", # Ruff-specific rules
]
ignore = [
# builtin-attribute-shadowing: Class attribute {name} is shadowing a python builtin
# Attributes don't actually shadow anything
"A003",
# error-suffix-on-exception-name
"N818",
# raise-vanilla-args: Avoid specifying long messages outside the exception class
"TRY003",
# try-consider-else: Consider moving this statement to an else block
"TRY300",
# Disable some rules that conflict with the formatter
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E111",
"E114",
"E117",
"E501",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",
"ISC001",
"ISC002",
]
unfixable = [
# unused-variable: Local variable {name} is assigned to but never used
# This can be undesirable if the file is saved before adding the code that
# uses a variable.
"F841",
]
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md
[tool.pyright]
typeCheckingMode = "standard"
exclude = ["**/__pycache__"]
extraPaths = ["../calibre/src"]
ignore = ["../calibre/src"]
pythonVersion = "3.8"
reportDuplicateImport = "error"
reportImportCycles = "warning"
# reportPrivateUsage = "warning"
reportUnnecessaryCast = "warning"
reportUnnecessaryIsInstance = "warning"
reportUnusedFunction = "warning"
reportUnusedVariable = "warning"
strictListInference = true
strictDictionaryInference = true
strictParameterNoneValue = true