forked from srehwald/eat-api
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathpyproject.toml
More file actions
83 lines (75 loc) · 2.04 KB
/
pyproject.toml
File metadata and controls
83 lines (75 loc) · 2.04 KB
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
[project]
name = "eat-api"
version = "0.1.0"
description = "Simple API for some (student) food places in Munich."
authors = [{ name = "TUM-Dev" }]
license = "MIT"
readme = "README.md"
requires-python = ">= 3.10"
dependencies = [
"lxml~=6.0",
"pyopenmensa~=0.95",
"requests~=2.32",
"deepl~=1.28",
]
[dependency-groups]
dev = [
"mypy~=1.19",
"pre-commit~=4.3",
"pytest~=9.0",
"ruff>=0.15.5",
"syrupy~=5.0",
"types-requests~=2.32",
]
[project.urls]
homepage = "https://eat-api.tum.sexy/"
repository = "https://github.com/TUM-Dev/eat-api"
issues = "https://github.com/TUM-Dev/eat-api/issues"
documentation = "https://tum-dev.github.io/eat-api/docs/"
[tool.mypy]
ignore_missing_imports = true
disallow_incomplete_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
no_implicit_reexport = true
strict_equality = true
pretty = true
[tool.pytest]
ini_options = { pythonpath = "src" }
[tool.ruff]
line-length = 120
[tool.ruff.format]
line-ending = "lf"
[tool.ruff.lint]
select = [
"F", # flake8
"I", # isort
"E", "W", # pep8 = pycodestyle
"PGH004", # pygrep-hooks check-blanket-noqa
"PYI033", # pygrep-hooks use-type-annotations
"COM", # flake8-commas
"B", # flake8-bugbear, B006 = flake8-mutable
"C4", # flake8-comprehensions
"RET", # flake8-return
"SIM", # flake8-simplify
"T203", # flake8-print
"S", # flake8-bandit = bandit
"F541", "FLY002", # flake8-use-fstrings
"PL", # pylint
]
ignore = [
"COM812", # handled by formatter
"B028", # warn should output the line it's called on
"SIM108", # ternary is less readable than if-else
"PLW2901", # assign to for loop variable
# TODO code quality
"PLR0912", "PLR0915", "PLR0914", # too many branches / statements / local variables
"PLR1702", # too many nested blocks
"PLR2004", # magic values
"PLR6201", # use sets for contains
"PLW1641", # should use dataclass
]
[tool.ruff.lint.per-file-ignores]
"src/test/**" = ["S101"] # allow asserts in tests