-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
112 lines (101 loc) · 2.61 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
[project]
requires-python = ">=3.9"
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.black]
line-length = 120
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.pyright]
include = ["arkprtserver"]
exclude = ["**/__init__.py", "tests/**"]
typeCheckingMode = "strict"
reportMissingTypeStubs = "none"
reportImportCycles = "none"
reportPrivateUsage = "none"
reportUnknownMemberType = "warning"
[tool.coverage.run]
source = ["arkprtserver"]
omit = ["**/__init__.py", "**/__main__.py"]
[tool.coverage.report]
show_missing = true
skip_covered = false
sort = "cover"
[tool.ruff]
# 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)
# SLF: Private member access
# TCH: Not using TYPE_CHECKING (ugly)
# ANN10: Missing type annotation for self/cls (useless)
# ANN401: Use of typing.Any (complicates)
# B008: Do not perform function calls in argument defaults (pydantic)
# B027: Empty method in ABC (optional rewrite)
# B905: zip without strict= (ugly)
# C408: Unnecessary dict call (ugly)
# D105: Missing docstring in magic method (useless)
# FA100: Missing future annotations.
# 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)
# TRY003: Long exception message
# S101: Use of assert (type-checking)
# S110: Try, Except, Pass (annoying)
ignore = [
"A",
"ARG",
"EM",
"ERA",
"FBT",
"SLF",
"TCH",
"ANN10",
"ANN401",
"B008",
"B027",
"B905",
"C408",
"D105",
"FA100",
"N805",
"PERF401",
"PGH003",
"PLR0913",
"PLR2004",
"PLW2901",
"RET504",
"S101",
"TRY003",
"S110",
]
# 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)
"docs/conf.py" = ["INP001"]
"dev-requirements/setup.py" = ["INP001"]
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.pydocstyle]
convention = "numpy"