-
Notifications
You must be signed in to change notification settings - Fork 32
/
pyproject.toml
103 lines (93 loc) · 1.79 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
[build-system]
requires = [
"pip>=20.0",
"setuptools>=40.0",
"setuptools_scm[toml]>=4.0,<9",
"wheel"
]
build-backend = "setuptools.build_meta"
[tool.coverage.run]
source = ["grafana_client"]
[tool.coverage.report]
show_missing = true
fail_under = 0
omit = [
"test/*",
]
[tool.ruff]
line-length = 120
extend-exclude = [
"grafana_client/elements/__init__.py",
"grafana_client/elements/_async/__init__.py",
]
[tool.ruff.lint]
select = [
# Bandit
"S",
# eradicate
"ERA",
# flake8-2020
"YTT",
# isort
"I",
# print
"T20",
# Pycodestyle
"E",
"W",
# Pyflakes
"F",
# return
"RET",
# pyupgrade
# "UP",
# flake8-commas
"COM",
# future-annotations
# "FA",
# flake8-type-checking
"TCH",
# flake8-unused-arguments
"ARG",
# flake8-use-pathlib
"PTH"
]
extend-ignore = [
# Unnecessary `elif` after `return` or `raise` statement.
"RET505",
"RET506",
# No trailing commas.
"COM812"
]
unfixable = ["ERA", "F401", "F841", "T20", "ERA001"]
[tool.ruff.lint.per-file-ignores]
"examples/*" = ["ERA001", "T201"]
"script/*" = ["S603", "S605", "S607", "T201"]
"grafana_client/knowledge.py" = ["ERA001"]
# ===================
# Tasks configuration
# ===================
[tool.poe.tasks]
format = [
{cmd="script/generate_async.py format"},
{cmd="ruff format"},
{cmd="ruff check --fix"},
]
lint = [
{cmd="script/generate_async.py check"},
{cmd="ruff check"},
]
test = [
{cmd="python -m unittest -vvv"},
]
test-coverage = [
{cmd="coverage run -m unittest discover -vvv"},
{cmd="coverage xml"},
{cmd="coverage report"},
]
build = {cmd="python -m build"}
check = ["lint", "test"]
release = [
{ cmd = "python -m build" },
{ cmd = "twine upload --skip-existing dist/*" },
]