-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
140 lines (124 loc) · 3.7 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
137
138
139
140
[tool.poetry]
name = "infrahub_ansible_modules"
version = "1.2.2"
description = "Ansible collection to interact with Infrahub's API"
authors = ["OpsMill <[email protected]>"]
license = "GPLv3"
[tool.poetry.dependencies]
python = ">=3.9,<3.13"
ansible-core = [
{ version = ">=2.15.9", python = ">=3.9,<3.10" },
{ version = ">=2.17.4", python = ">=3.10" },
]
ansible-lint = "*"
infrahub-sdk = {version = "^1", extras = ["all"]}
codecov = "*"
deepdiff = "*"
cryptography = ">=42.0.0"
jinja2 = ">=3.1.4"
jmespath = "*"
pytest = "^8.3.4"
pytest-mock = "*"
pytest-xdist = "*"
pyyaml = "*"
mock = "^5.1.0"
antsibull = "0.67.0"
importlib-metadata = "8.5.0"
pytz = "*"
packaging = "*"
jsondiff = "*"
sphinx_rtd_theme = "*"
hypothesis = "^6.122.1"
pytest-pythonpath = "*"
parameterized = "^0.9.0"
invoke = "^2.2.0"
bandit = "^1.8.0"
antsibull-docs = "^2.16.1"
[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
ruff = "0.8.1"
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = [
"tests"
]
pythonpath = ["."]
[tool.ruff]
line-length = 120
exclude = [
".git",
".tox",
".venv",
"env",
"_build",
"build",
"dist",
"examples",
]
[tool.ruff.lint]
preview = true
task-tags = [
"FIXME",
"TODO",
"XXX",
]
select = [
"ASYNC", # flake8-async
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"C90", # mccabe complexity
"DJ", # flake8-django
"DTZ", # flake8-datetimez
"E", # pycodestyle errors
"EXE", # flake8-executable
"F", # pyflakes
"I", # isort-like checks
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"N", # pep8-naming
"PIE", # flake8-pie
"PL", # pylint
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"TCH", # flake8-type-checking
"TRIO", # flake8-trio
"T10", # flake8-debugger
"W", # pycodestyle warnings
"YTT", # flake8-2020
]
ignore = [
##################################################################################################
# The ignored rules below should be removed once the code has been updated, they are included #
# like this so that we can reactivate them one by one. Alternatively ignored after further #
# investigation if they are deemed to not make sense. #
##################################################################################################
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
"C408", # Unnecessary `dict` call (rewrite as a literal)
"E402", # Module level import not at top of file
"INP001", # Is part of an implicit namespace package
"N806", # Variable in function should be lowercase
"PLC0415", # `import` should be at the top-level of a file
"PLR0912", # Too many branches
"PLR6201", # Use a `set` literal when testing for membership
"PLR6301", # Method could be a function, class method, or static method
"PLR1702", # Too many nested blocks
"PLR0913", # Too many arguments in function definition
"RET504", # Unnecessary assignment before `return` statement
]
#https://docs.astral.sh/ruff/formatter/black/
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint.isort]
known-first-party = ["infrahub"]
[tool.ruff.lint.pycodestyle]
max-line-length = 150
[tool.ruff.lint.mccabe]
# Target max-complexity=10
max-complexity = 33
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"