-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
115 lines (98 loc) · 2.44 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
[tool.poetry]
name = "zuulcilint"
version = "1.0.0"
description = "Zuul CI linter"
authors = ["Pedro Baptista <[email protected]>"]
license = "MIT"
readme = "README.md"
keywords = ["zuul", "ci", "linter"]
repository = "https://github.com/codesquadnest/zuulcilint"
include = ["pyproject.toml", "LICENSE", "README.md", "zuulcilint/zuul-schema.yaml"]
exclude = ["tests/*"]
packages = [{include = "zuulcilint"}]
[tool.poetry.scripts]
zuulcilint = "zuulcilint.__main__:main"
[tool.poetry.dependencies]
jsonschema = "^4.23.0"
poetry = "^2.0.0"
python = "^3.9, <4.0"
PyYAML = "^6.0.1"
six = "^1.16.0"
[tool.poetry.group.dev.dependencies]
pre-commit = ">=3.5,<5.0"
pytest = ">=7.4.4,<9.0.0"
pytest-cov = ">=4.1,<7.0"
ruff = ">=0.1.13,<0.10.0"
tox = "^4.12.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
# Configurations for black
[tool.black]
line-length = 100
target-version = ["py39"]
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
extend-ignore = "E203,E501"
# Configurations for pytest
[tool.pytest]
addopts = ["-ra", "--cov=zuulcilint", "--cov-report=term-missing"]
testpaths = ["tests"]
[toolpytest.cov]
fail_under = 80
select = ["ALL"]
target-version = "py310"
# Same as Black.
line-length = 100
[lint.per-file-ignores]
"tests/**/*.py" = ["S101"] # Use of assert detected.
[lint.mccabe]
# Implicit 10 is too low for our codebase, even black uses 18 as default.
max-complexity = 20
[lint.flake8-builtins]
builtins-ignorelist = ["id"]
[lint.ignore]
ignore = [
"D211", # No blank lines allowed after function docstring
"D213", # Multi-line docstring summary should start at the second line
# temporary disabled until we fix them:
"T201",
"ANN",
"S603", # subprocess call - check for execution of untrusted input
"S607", # start process with a partial path
]
# Configurations for tox
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py{39,310,311,312,313}, lint, pre-commit
skipsdist = True
skip_missing_interpreters = True
[testenv]
deps =
poetry
commands =
poetry install -v
poetry run pytest --cov=zuulcilint --cov-report=term-missing
[testenv:lint]
deps =
ruff
commands =
ruff check zuulcilint tests
[testenv:pre-commit]
skip_install = true
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
"""