-
Notifications
You must be signed in to change notification settings - Fork 18
/
pyproject.toml
697 lines (591 loc) · 23.1 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
[tool.poetry]
name = "infrahub-server"
version = "1.0.9b0"
description = "Infrahub is taking a new approach to Infrastructure Management by providing a new generation of datastore to organize and control all the data that defines how an infrastructure should run."
authors = ["OpsMill <[email protected]>"]
readme = "README.md"
license = "AGPL-3.0-only"
homepage = "https://opsmill.com"
repository = "https://github.com/opsmill/infrahub"
documentation = "https://docs.infrahub.app/"
classifiers = [
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
packages = [
{ include = "infrahub", from = "backend" },
{ include = "infrahub_sdk", from = "python_sdk" },
]
[tool.poetry.dependencies]
python = "^3.10, < 3.13"
neo4j = "~5.24"
neo4j-rust-ext = "^5.24.0.0"
pydantic = "2.7.2"
pydantic-settings = "~2.2"
pytest = "~7.4"
aio-pika = "~9.4"
structlog = "24.1.0"
boto3 = "1.34.129"
email-validator = "~2.1"
redis = { version = "^5.0.0", extras = ["hiredis"] }
typer = "0.12.5"
prefect = "3.0.3"
ujson = "^5"
Jinja2 = "^3"
gitpython = "^3"
pyyaml = "^6"
toml = "^0.10"
# Dependencies specific to the API Server
fastapi = "~0.115"
fastapi-storages = "~0.3"
graphene = "~3.4"
gunicorn = "^23.0.0"
lunr = "^0.7.0.post1"
starlette-exporter = "~0.23"
python-multipart = "0.0.18" # Required by FastAPI to upload large files
asgi-correlation-id = "4.2.0" # Middleware for FastAPI to generate ID per request
bcrypt = "~4.1" # Used to hash and validate password
pyjwt = "~2.8" # Used to manage JWT tokens
uvicorn = { version = "~0.32", extras = ["standard"] }
opentelemetry-instrumentation-aio-pika = "^0.45b0"
opentelemetry-instrumentation-fastapi = "^0.45b0"
opentelemetry-exporter-otlp-proto-grpc = "^1.24.0"
opentelemetry-exporter-otlp-proto-http = "^1.24.0"
nats-py = "^2.7.2"
netaddr = "1.3.0"
authlib = "1.3.2"
# Dependencies specific to the SDK
rich = "^13"
pyarrow = "^14"
numpy = [
{ version = "^1.24.2", python = ">=3.9,<3.12" },
{ version = "^1.26.2", python = ">=3.12" },
]
[tool.poetry.group.dev.dependencies]
yamllint = "*"
pylint = "~3.1"
mypy = "*"
ipython = "~8"
pytest-asyncio = "^0.21.1"
pytest-httpx = [
{ version = "~0.21", python = "<3.9" },
{ version = ">=0.30", python = ">=3.9" },
]
pytest-clarity = "~1.0"
pytest-cov = "~4.1"
pytest-xdist = "~3.4"
types-python-slugify = "^8.0.0.3"
pre-commit = "^2.20.0"
types-toml = "*"
types-ujson = "*"
types-pyyaml = "*"
ruff = "0.7.1"
invoke = "2.2.0"
pytest-benchmark = "^4.0.0"
pytest-codspeed = "^2.2.0"
deepdiff = "^6.2"
polyfactory = "^2.16.2"
towncrier = "^24.8"
pytest-env = "^1.1.3"
testcontainers = "^4.8.1"
pytest-timeout = "^2.3.1"
matplotlib = "^3.9.2"
pandas = "^2.2.3"
semver = "^3.0.2"
ruamel-yaml = "^0.18.6"
# [tool.poetry.group.test-scale.dependencies]
# locust = "^2.20.1"
# docker = "^7.0.0"
# matplotlib = "^3.8"
# pandas = "^2.2"
[tool.poetry.scripts]
infrahub = "infrahub.cli:app"
infrahub-git-credential = "infrahub.git_credential.helper:app"
infrahub-git-askpass = "infrahub.git_credential.askpass:app"
infrahubctl = "infrahub_sdk.ctl.cli:app"
[tool.poetry.plugins."pytest11"]
"pytest-infrahub" = "infrahub_sdk.pytest_plugin.plugin"
[tool.poetry.plugins."prefect.collections"]
"infrahubasync" = "infrahub.workers.infrahub_async"
[tool.coverage.run]
branch = true
[tool.coverage.report]
exclude_lines = ["if TYPE_CHECKING:", "raise NotImplementedError()"]
[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,
"""
[tool.pylint.miscellaneous]
notes = """,
FIXME,
XXX,
"""
[tool.pylint.similarities]
min-similarity-lines = 20
[tool.pytest.ini_options]
asyncio_mode = "auto"
timeout = 300 # 5 minutes
session_timeout = 1200 # 20 minutes
testpaths = ["tests"]
filterwarnings = [
"ignore:Module already imported so cannot be rewritten",
"ignore:Deprecated call to",
"ignore:pkg_resources is deprecated as an API", # Remove on https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2181 has been fixed
]
addopts = "-vs --cov-report term-missing --cov-report xml --dist loadscope --junitxml=pytest-junit.xml"
junit_duration_report = "call"
[tool.pytest_env]
PREFECT_LOGGING_LEVEL = "CRITICAL"
INFRAHUB_LOG_LEVEL = "CRITICAL"
[tool.mypy]
pretty = true
ignore_missing_imports = true
disallow_untyped_defs = true
disable_error_code = ["type-abstract"]
exclude = [
"^backend/tests/scale",
"^backend/tests/unit",
"^backend/tests/test_data",
"^backend/tests/query_benchmark",
]
[[tool.mypy.overrides]]
module = "infrahub.*"
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = "tests.benchmark.*"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = "tests.conftest"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = "tests.fixtures.*"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = "tests.integration.*"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = "infrahub.api.diff.diff"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.attribute"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.manager"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.node"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.node.base"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.node.standard"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.query"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.query.diff"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.query.ipam"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.query.node"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.query.relationship"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.query.standard_node"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.query.subquery"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.schema.basenode_schema"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.schema.schema_branch"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.schema.manager"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.core.utils"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.database"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.git.base"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.git.repository"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.git_credential.askpass"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.graphql.mutations.ipam"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.graphql.mutations.main"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.graphql.mutations.proposed_change"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.graphql.mutations.relationship"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.graphql.mutations.repository"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.graphql.mutations.schema"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.graphql.resolver"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.graphql.types.standard_node"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.graphql.utils"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.lock"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.message_bus.operations"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.message_bus.operations.check.artifact"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.message_bus.operations.check.generator"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.message_bus.operations.check.repository"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.message_bus.operations.refresh.webhook"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.message_bus.operations.requests.artifact"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.message_bus.operations.requests.graphql_query_group"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.message_bus.operations.requests.repository"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.message_bus.operations.schema.migration"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.message_bus.operations.schema.validator"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.test_data.dataset03"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.test_data.dataset04"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.test_data.gen_connected_nodes"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.test_data.gen_isolated_node"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.test_data.gen_node_profile_node"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.test_data.shared"
ignore_errors = true
[[tool.mypy.overrides]]
module = "infrahub.trace"
ignore_errors = true
[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 = [
"ANN", # flake8-annotations
"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
"FURB", # refurb
"I", # isort-like checks
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"N", # pep8-naming
"PERF", # Perflint
"PIE", # flake8-pie
"PL", # pylint
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RUF", # Ruff specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"T10", # flake8-debugger
"UP", # pyupgrade
"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. #
##################################################################################################
"ASYNC110", # Use `anyio.Event` instead of awaiting `anyio.sleep` in a `while` loop
"ASYNC230", # Async functions should not open files with blocking methods like `open`
"ASYNC251", # Async functions should not call `time.sleep`
"B007", # Loop control variable not used within loop body
"B008", # Do not perform function call `Depends` in argument defaults;
"B009", # [*] Do not call `getattr` with a constant attribute value. It is not any safer than normal property access.
"B010", # [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access.
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
"C403", # Unnecessary `list` comprehension (rewrite as a `set` comprehension)
"C409", # Unnecessary `list` literal passed to `tuple()` (rewrite as a `tuple` literal)
"C414", # Unnecessary `list` call within `sorted()`
"C420", # Unnecessary dict comprehension for iterable; use `dict.fromkeys` instead
"FURB113", # Use `networks.extend(...)` instead of repeatedly calling `networks.append()`
"FURB116", # Replace `bin` call with f-string
"FURB118", # Use `operator.itemgetter(1)` instead of defining a lambda
"FURB140", # Use `itertools.starmap` instead of the generator
"FURB171", # Membership test against single-item container
"FURB192", # Prefer `min` over `sorted()` to compute the minimum value in a sequence
"N801", # Class name should use CapWords convention
"N802", # Function name should be lowercase
"N805", # First argument of a method should be named self
"N806", # Variable in function should be lowercase
"N812", # Lowercase imported as non-lowercase
"PERF203", # `try`-`except` within a loop incurs performance overhead
"PERF401", # Use a list comprehension to create a transformed list
"PERF402", # Use `list` or `list.copy` to create a copy of a list
"PERF403", # Use a dictionary comprehension instead of a for-loop
"PLC0415", # `import` should be at the top-level of a file
"PLC2701", # Private name import from external module
"PLR0904", # Too many public methods
"PLR0912", # Too many branches
"PLR0913", # Too many arguments in function definition
"PLR0914", # Too many local variables
"PLR0915", # Too many statements
"PLR0916", # Too many Boolean expressions
"PLR0917", # Too many positional arguments
"PLR1702", # Too many nested blocks
"PLR2004", # Magic value used in comparison this could possibly be fine in the tests folders
"PLR6201", # Use a `set` literal when testing for membership
"PLR6301", # Method could be a function, class method, or static method
"PLW0603", # Using the global statement to update `SETTINGS` is discouraged
"PLW1508", # Invalid type for environment variable default; expected `str` or `None`
"PTH100", # `os.path.abspath()` should be replaced by `Path.resolve()`
"PTH102", # `os.mkdir()` should be replaced by `Path.mkdir()`
"PTH103", # `os.makedirs()` should be replaced by `Path.mkdir(parents=True)`
"PTH107", # `os.remove()` should be replaced by `Path.unlink()`
"PTH108", # `os.unlink()` should be replaced by `Path.unlink()`
"PTH109", # `os.getcwd()` should be replaced by `Path.cwd()`
"PTH110", # `os.path.exists()` should be replaced by `Path.exists()`
"PTH112", # `os.path.isdir()` should be replaced by `Path.is_dir()`
"PTH113", # `os.path.isfile()` should be replaced by `Path.is_file()`
"PTH117", # `os.path.isabs()` should be replaced by `Path.is_absolute()`
"PTH118", # `os.path.join()` should be replaced by `Path` with `/` operator
"RET503", # Missing explicit `return` at the end of function able to return non-`None` value
"RET504", # Unnecessary assignment before `return` statement
"RUF005", # Consider `[*list(peers.values()), rfc5735]` instead of concatenation
"RUF006", # Store a reference to the return value of `asyncio.create_task`
"RUF010", # Use explicit conversion flag
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"RUF015", # Prefer `next(...)` over single element slice
"RUF021", # Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
"RUF027", # Possible f-string without an `f` prefix
"RUF029", # Function is declared `async`, but doesn't `await` or use `async` features.
"S101", # Use of `assert` detected
"S105", # Possible hardcoded password assigned to: "REGEX_PASSWORD"
"S108", # Probable insecure usage of temporary file or directory
"S202", # Uses of `tarfile.extractall()`
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"S701", # By default, jinja2 sets `autoescape` to `False`. Consider using `autoescape=True`
"SIM108", # Use ternary operator `markexpr = "not neo4j" if not markexpr else f"not neo4j and ({markexpr})"` instead of `if`-`else`-block
"SIM102", # Use a single `if` statement instead of nested `if` statements
"SIM103", # Return the condition `identifier in self.sub_by_id.keys()` directly
"SIM105", # Use `contextlib.suppress(SchemaNotFoundError)` instead of `try`-`except`-`pass`
"SIM110", # Use `return any(worktree.identifier == identifier for worktree in worktrees)` instead of `for` loop
"SIM114", # Combine `if` branches using logical `or` operator
"SIM115", # Use a context manager for opening files
"SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements
"SIM118", # Use `key in dict` instead of `key in dict.keys()`
"SIM201", # Use `backup_path.suffix != ".backup"` instead of `not backup_path.suffix == ".backup"`
"SIM401", # Use `property["items"].get("format", None)` instead of an `if` block
"SIM910", # Use `data.get("identifier")` instead of `data.get("identifier", None)`
"UP012", # Unnecessary call to encode as UTF-8
"UP018", # Unnecessary {literal_type} call (rewrite as a literal)
"UP031", # Use format specifiers instead of percent format
]
#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
[tool.ruff.lint.pylint]
allow-dunder-method-names = [
"__init_subclass_with_meta__", # Dunder method used within Graphene
]
[tool.ruff.lint.per-file-ignores]
"backend/infrahub/**.py" = [
##################################################################################################
# Review and change the below later #
##################################################################################################
"ANN001", # Missing type annotation for function argument
"ANN003", # Missing type annotation for `**kwargs`
"ANN204", # Missing return type annotation for special method
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
"UP007", # Use X | Y for type annotations
]
"backend/infrahub/config.py" = [
"S323", # Allow users to create an SSL context that doesn't validate certificates
]
"backend/infrahub/graphql/mutations/**.py" = [
##################################################################################################
# Review and change the below later #
##################################################################################################
"ANN206", # Missing return type annotation for classmethod
]
"backend/tests/**.py" = [
"S101", # Use of assert detected
"S105", # Possible hardcoded password assigned to variable
"S106", # Possible hardcoded password assigned to argument
##################################################################################################
# Review and change the below later #
##################################################################################################
"ANN001", # Missing type annotation for function argument
"ANN002", # Missing type annotation for `*args`
"ANN003", # Missing type annotation for `**kwargs`
"ANN201", # Missing return type annotation for public function
"ANN202", # Missing return type annotation for private function
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
]
"models/infrastructure_edge.py" = [
"S106", # Hardcoded password
##################################################################################################
# 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. #
##################################################################################################
"C901", # `generate_site` is too complex (34 > 33)"
"E501", # Line too long
"RUF013", # PEP 484 prohibits implicit `Optional`
]
"utilities/**.py" = [
##################################################################################################
# Review and change the below later #
##################################################################################################
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
]
[tool.towncrier]
package = "infrahub"
directory = "changelog"
filename = "CHANGELOG.md"
start_string = "<!-- towncrier release notes start -->\n"
underlines = ["", "", ""]
title_format = "## [Infrahub - v{version}](https://github.com/opsmill/infrahub/tree/infrahub-v{version}) - {project_date}"
issue_format = "[#{issue}](https://github.com/opsmill/infrahub/issues/{issue})"
orphan_prefix = "+"
template = "changelog/towncrier.md.template"
[[tool.towncrier.type]]
directory = "security"
name = "Security"
showcontent = true
[[tool.towncrier.type]]
directory = "removed"
name = "Removed"
showcontent = true
[[tool.towncrier.type]]
directory = "deprecated"
name = "Deprecated"
showcontent = true
[[tool.towncrier.type]]
directory = "added"
name = "Added"
showcontent = true
[[tool.towncrier.type]]
directory = "changed"
name = "Changed"
showcontent = true
[[tool.towncrier.type]]
directory = "fixed"
name = "Fixed"
showcontent = true
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"