-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
149 lines (127 loc) · 3.75 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
141
142
143
144
145
146
147
148
149
[tool.poetry]
name = "nornir-infrahub"
version = "1.0.2"
description = "Nornir plugin for Infrahub"
authors = ["OpsMill <[email protected]>"]
readme = "README.md"
license = "Apache-2.0"
homepage = "https://opsmill.com"
repository = "https://github.com/opsmill/nornir-infrahub"
documentation = "https://docs.infrahub.app/"
classifiers = [
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
packages = [{ include = "nornir_infrahub" }]
[tool.poetry.plugins."nornir.plugins.inventory"]
"InfrahubInventory" = "nornir_infrahub.plugins.inventory.infrahub:InfrahubInventory"
[tool.poetry.dependencies]
python = "^3.9, <3.13"
infrahub-sdk = { version = "^1,>=1.3.0", extras = ["tests"] }
ruamel-yaml = "^0.18.5"
nornir = "^3.5"
nornir-utils = "^0.2.0"
python-slugify = "^8.0.1"
pydantic = ">=1.7.4,!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0"
[tool.poetry.group.dev.dependencies]
pytest = "*"
ruff = "0.9.5"
mypy = "*"
pytest-asyncio = "^0.21.1"
types-python-slugify = "*"
invoke = "2.2.0"
yamllint = "*"
pylint = "~3.1"
docstring-parser = "^0.16"
jinja2 = "^3.1.5"
vale = "^3.9.4.0"
[tool.coverage.run]
branch = true
[tool.coverage.report]
exclude_lines = ["if TYPE_CHECKING:", "raise NotImplementedError()"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
filterwarnings = ["ignore:pkg_resources is deprecated"]
addopts = "-vs"
[tool.mypy]
pretty = true
ignore_missing_imports = true
[tool.pylint.general]
extension-pkg-whitelist = ["pydantic", "ujson"]
[tool.pylint.format]
disable = "logging-fstring-interpolation"
[tool.pylint.basic]
# No docstrings required for private methods (Pylint default), or for test_ functions.
no-docstring-rgx = "^(_|test_)"
[tool.pylint.messages_control]
# Line length is enforced by Black, so pylint doesn't need to check it.
# Pylint and Black disagree about how to format multi-line arrays; Black wins.
# assigning-non-slot,no-member,unsupported-membership-test,unsubscriptable-object,unsupported-assignment-operation,not-an-iterable
# are disabled because of our move to pydantic 2, pylint does not seem to respect the type hint for pydantic 2 model fields.
disable = """,
line-too-long,
missing-module-docstring,
missing-function-docstring,
missing-class-docstring,
consider-using-from-import,
invalid-name,
too-many-arguments,
too-many-locals,
keyword-arg-before-vararg,
too-few-public-methods,
too-many-instance-attributes,
fixme,
consider-using-f-string,
protected-access,
import-self,
wrong-import-order,
assigning-non-slot,
no-member,
unsupported-membership-test,
unsubscriptable-object,
unsupported-assignment-operation,
not-an-iterable,
too-many-return-statements,
unnecessary-comprehension,
multiple-statements,
self-assigning-variable,
no-else-return,
"""
[tool.pylint.miscellaneous]
notes = """,
FIXME,
XXX,
"""
[tool.pylint.similarities]
min-similarity-lines = 20
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = [
"C90", # mccabe
"ASYNC", # flake8-async
"DTZ", # flake8-datetimez
"E", # style errors
"F", # flakes
"I", # isort
"ICN", # flake8-import-conventions
"TCH", # flake8-type-checking
"T10", # flake8-debugger
"PL", # pylint
"Q", # flake8-quotes
"W", # pycodestyle
"YTT", # flake8-2020
]
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.isort]
known-third-party = ["nornir_infrahub"]
[tool.ruff.lint.per-file-ignores]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"