JSON Schema validation of the two pyproject.toml files in Infrahub fails with the following error:
{"preview":true,"task-tags":["FIXME","TODO","XXX"],"select":["ASYNC","B","C4","C90","DJ","DTZ","E","EXE","F","I","ICN","INP","N","PIE","PL","PTH","PYI","Q","RET","S","TCH","TRIO","T10","UP","W","YTT"],"ignore":["ASYNC101","B007","B008","B009","B010","B904","C403","C409","C414","N801","N802","N805","N806","N812","PLC0415","PLC2701","PLR0904","PLR0912","PLR0913","PLR0914","PLR0915","PLR0916","PLR0917","PLR1702","PLR2004","PLR6201","PLR6301","PLW0603","PLW1508","PLW3201","PTH100","PTH102","PTH103","PTH107","PTH108","PTH109","PTH110","PTH112","PTH113","PTH117","PTH118","RET503","RET504","S101","S105","S108","S202","S311","S701","UP007","UP008","UP012","UP018","UP031","UP034"],"isort":{"known-first-party":["infrahub"]},"pycodestyle":{"max-line-length":150},"mccabe":{"max-complexity":33},"per-file-ignores":{"backend/infrahub/git/repository.py":["TCH003"],"backend/tests/**.py":["S101","S105","S106"],"models/infrastructure_edge.py":["S106","C901","E501"]}} is not valid under any of the given schemas
<snip> is not valid under any of the given schemas
Upon closer inspection, this is correct, and the configuration as stands is not valid:
Component
Not Sure
Task Description
JSON Schema validation of the two
pyproject.toml
files in Infrahub fails with the following error:Upon closer inspection, this is correct, and the configuration as stands is not valid:
https://www.jsonschemavalidator.net/s/JS9mMhoM
There are two problems:
TRIO
checks have been deprecated and moved/renamed toASYNC
ASYNC101
check has been deprecated and split into five other checks:ASYNC220
ASYNC221
ASYNC222
ASYNC230
ASYNC251
See: https://github.com/astral-sh/ruff/pull/10416
Two fixes needed:
tool.ruff.lint.select
ofTRIO
can be removed, as it is covered byASYNC
tool.ruff.lint.ignore
ofASYNC101
can be removed and replaced by the 5 listed checks above