-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathpyproject.toml
More file actions
96 lines (93 loc) · 2.28 KB
/
pyproject.toml
File metadata and controls
96 lines (93 loc) · 2.28 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
84
85
86
87
88
89
90
91
92
93
94
95
96
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=42", # At least v42 of setuptools required!
"versioningit",
]
[tool.ruff]
line-length = 80
extend-exclude = [ "__init__.py" ]
lint.select = [
# Builtins
"A",
# Bugbear
"B",
"B9",
# comprehensions
"C",
# Pycodestyle
"E",
# eradicate
"ERA",
# Pyflakes
"F",
# isort
"I",
# pandas-vet
"PD",
# return
"RET",
# Bandit
"S",
# from `.flake8` file
"T", # T4
# print
"T20",
"W",
# flake8-2020
"YTT",
]
lint.ignore = [
"B905", # B905 `zip()` without an explicit `strict=` parameter
"E203",
"E266",
"E501",
"ERA001", # Found commented-out code
"RET505", # Unnecessary `else` after `return` statement
# "W503", # Unknown rule selector
]
# FIXME: Improve this situation wrt. SQL injection, even it is not be an actual attack vector.
lint.per-file-ignores."*sqlite.py" = [
"S608", # Possible SQL injection vector through string-based query construction
]
lint.per-file-ignores."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)
]
lint.per-file-ignores."tests/*" = [
"S101", # Use of `assert` detected
]
lint.per-file-ignores."tests/middlewares/throttle/conftest.py" = [
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
]
# from `.isort.cfg` file
lint.isort.combine-as-imports = true
lint.isort.force-wrap-aliases = true
lint.isort.known-third-party = [
"dateutil",
"dogpile",
"dotenv",
"pytest",
"requests",
"six",
]
lint.isort.split-on-trailing-comma = false
# from `.flake8` file
# Flag errors (`C901`) whenever the complexity level exceeds the configured value.
lint.mccabe.max-complexity = 7
[tool.pytest]
ini_options.minversion = "2.0"
ini_options.addopts = """
-rsfEX -p pytester --strict-markers --verbosity=3
--cov=epo_ops tests --cov-report=term-missing --cov-report=xml
"""
ini_options.log_level = "DEBUG"
ini_options.log_cli_level = "DEBUG"
ini_options.testpaths = [ "tests" ]
ini_options.xfail_strict = true
ini_options.markers = []
[tool.versioningit]
vcs.method = "git-archive"
vcs.default-tag = "v0.0.0"
vcs.describe-subst = "$Format:%(describe:tags,match=v*)$"