-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathpyproject.toml
111 lines (98 loc) · 2.1 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
# ==================
# Build system setup
# ==================
[build-system]
requires = [
"setuptools>=42", # At least v42 of setuptools required!
"versioningit",
]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
minversion = "2.0"
addopts = """
-rsfEX -p pytester --strict-markers --verbosity=3
--cov=epo_ops tests --cov-report=term-missing --cov-report=xml
"""
log_level = "DEBUG"
log_cli_level = "DEBUG"
testpaths = ["tests"]
xfail_strict = true
markers = []
[tool.ruff]
line-length = 80
lint.select = [
# Bandit
"S",
# Bugbear
"B",
# Builtins
"A",
# comprehensions
"C",
# eradicate
"ERA",
# flake8-2020
"YTT",
# isort
"I",
# pandas-vet
"PD",
# print
"T20",
# Pycodestyle
"E",
"W",
# Pyflakes
"F",
# return
"RET",
# from `.flake8` file
"T", # T4
"B9",
]
extend-exclude = ["__init__.py"]
lint.ignore = [
"E203",
"E266",
"E501",
"ERA001", # Found commented-out code
"RET505", # Unnecessary `else` after `return` statement
# "W503", # Unknown rule selector
]
# from `.isort.cfg` file
[tool.ruff.lint.isort]
combine-as-imports = true
force-wrap-aliases = true
known-third-party = [
"dateutil",
"dogpile",
"dotenv",
"pytest",
"requests",
"six",
]
split-on-trailing-comma = false
# from `.flake8` file
[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds the configured value.
max-complexity = 7
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"S101", # Use of `assert` detected
]
"epo_ops/api.py" = [
"A001", # Variable `range` is shadowing a Python builtin
"A002", # Argument `input` is shadowing a Python builtin
"C408", # Unnecessary `dict` call (rewrite as a literal)
]
# FIXME: Improve this situation wrt. SQL injection, even it is not be an actual attack vector.
"*sqlite.py" = [
"S608", # Possible SQL injection vector through string-based query construction
]
"tests/middlewares/throttle/conftest.py" = [
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
]
[tool.versioningit]
[tool.versioningit.vcs]
method = "git"
default-tag = "0.0.0"