-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
136 lines (126 loc) · 3.75 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
127
128
129
130
131
132
133
134
135
136
[tool.poetry]
name = "acacore"
version = "4.1.1"
description = ""
authors = ["Matteo Campinoti <[email protected]>"]
license = "GPL-3.0"
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.11"
pydantic = "^2.10.2"
pyyaml = "^6.0.2"
click = "^8.1.7"
imagesize = "^1.4.1"
packaging = "^24.2"
pillow = "^11.0.0"
orjson = "^3.10.12"
[tool.poetry.group.dev.dependencies]
ruff = "^0.6.7"
pytest = "^8.3.3"
coverage = "^7.6.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
line-length = 120
[tool.ruff.format]
line-ending = "lf"
[tool.ruff.lint]
select = [
"C",
"E",
"F",
"W",
# "B", Will ask for some refactoring of error handling
"I",
# "C90", Checks for complexity, might be good but not essential
# "N", Will force us to redo the naming of several functions
"D",
"UP",
"YTT",
"ANN",
# "S", Will help us have secure calls to sub.process and such, might be good
"BLE",
# "FBT", Will asks us to remove boolean flags
"A",
# "COM",
"C4",
"DTZ",
"T10",
"ISC",
"ICN",
"INP",
"PIE",
"PT",
"RSE",
"RET",
"SIM",
"TID",
"ARG",
"PLE",
# "PLR", Will suggest several large refactoring
"PLW",
# "TRY", Will help with our exception handling
"RUF",
]
ignore = [
"E501", # line to long, to many false positives, gets handled by black
"ANN002", # missing type anottation for *args
"ANN003", # missing type anotation for **kwargs
"ANN101", # missing type for self
"ANN102", # missing type for cls
"ANN201", # missing return type
"ANN202", # missing return type
"ANN206", # missing return type
"ARG001", # missing type anotattion for args
"BLE001", # catching general exceptions
"D100", # missing docstring
"D101", # missing docstring
"D102", # missing docstring
"D103", # missing docstring,
"D104", # missing docstring,
"D105", # missing docstring in magic method,
"D106", # missing docstring in nested class,
"D107", # missing docstring in __init__,
"D203", # 0 blank line required before class docstring,
"D204", # 1 blank line required after class docstring,
"D212", # multi-line docstring summary should start at the first line,
"D213", # multi-line docstring summary should start at the second line,
"D300", # use triple docstring
"D401", # first line of docstring should be in imperative mood
"DTZ005", # datetime.datetime.now() called without a tz argument
"E712", # comparison to True/False, we ignore because we use sqlalchemy
"FBT001", # boolean arguement in function definition
"N802", # name of function should be lower case
"PLR2004", # magic value used in comparison
"PT012", # ptest.raises should contain a simple statement
"RET505", # unnecessary {branch} after return statement
"S101", # use of assert,
"SIM118", # Use `key in dict` instead of `key in dict.keys()`
"TRY003", # avoid using long messages outside exception class
"UP007", # not using | in type anotations
"INP001", # implicit namespace without __init__ (throws errors in tests)
"PLW2901", # redefing loop variables
"C901", # complexity check
"ISC001", # check for implicit concatanation of str on one line, not compatabil with black.
]
exclude = [
".venv",
"env",
"venv",
".git",
"__pycache__",
".github",
".mypy_cache",
".pytest_cache",
"__init__.py"
]
[tool.ruff.lint.isort]
combine-as-imports = false
force-single-line = true
order-by-type = false
[tool.ruff.lint.pydocstyle]
convention = "pep257"
ignore-decorators = ["pytest.fixture"]
[tool.ruff.lint.pycodestyle]
max-doc-length = 300