-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
124 lines (116 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
[project]
name = "arkprts"
requires-python = ">=3.9"
version = "0.3.13"
dynamic = [
"dependencies",
"description",
"license",
"optional-dependencies",
"readme",
]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.black]
line-length = 120
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
[tool.pyright]
include = ["arkprts"]
exclude = ["**/__init__.py", "tests/**"]
typeCheckingMode = "strict"
reportMissingTypeStubs = "none"
reportImportCycles = "none"
reportPrivateUsage = "none"
disableBytesTypePromotions = false
[tool.ruff]
target-version = "py38"
# 120 from black and then a bit
line-length = 130
[tool.ruff.lint]
select = ["ALL"]
# A: Shadowing built-in
# ARG: Unused function argument (duck-typing)
# EM: String literal in exception
# ERA: Commented-out code
# FBT: Boolean in positional function type (duck-typing)
# PERF: Performance improvements (in python...)
# SLF: Private member access
# TCH: Not using TYPE_CHECKING (ugly)
# ANN10: Missing type annotation for self/cls (useless)
# ANN401: Use of typing.Any (complicates)
# B007: Loop variable not used within loop body but outside
# B008: Do not perform function calls in argument defaults (pydantic)
# B027: Empty method in ABC (optional rewrite)
# B028: No stacklevel in warnings
# B905: zip without strict= (ugly)
# C408: Unnecessary dict call (ugly)
# D105: Missing docstring in magic method (useless)
# FA100: Missing future annotations.
# E501: Line too long (black already manages this)
# N805: First argument is not self (pydantic)
# PGH003: Specific rules when ignoring type issues
# PLR0913: Too many arguments
# PLR2004: constant value in comparison (asserts)
# PLW2901: Redefining for-loop variable
# RET504: Unnecessary variable before return (ugly)
# S101: Use of assert (type-checking)
# S110: Try, Except, Pass (annoying)
# S3xx: Use of random or md5
# S607: Using git instead of an entire path
# TRY003: Long exception message
# UP013: Functional TypedDict
ignore = [
"A",
"ARG",
"EM",
"ERA",
"FBT",
"PERF",
"SLF",
"TCH",
"ANN10",
"ANN401",
"B007",
"B008",
"B027",
"B028",
"B905",
"C408",
"D105",
"FA100",
"E501",
"N805",
"PGH003",
"PLR0913",
"PLR2004",
"PLW2901",
"RET504",
"S101",
"S3",
"S607",
"TRY003",
"UP013",
]
# auto-fixing too intrusive
# F401: Unused import
# F841: Unused variable
# B007: Unused loop variable
unfixable = ["F401", "F841", "B007"]
[tool.ruff.lint.per-file-ignores]
# F40: import (unused imports)
"**/__init__.py" = ["F40"]
# T201: use of print
"**/__main__.py" = ["T201"]
# D10: missing docstring (tests)
# F841: unused variable (return values)
# S10: hardcoded passwords (dummy values)
"tests/**" = ["D10", "F841", "S10"]
# INP001: No __init__.py (configuration)
"dev-requirements/setup.py" = ["INP001"]
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.pydocstyle]
convention = "numpy"