feat: use pydantic mypy plugin to have improved linting of models (#3311)

This commit is contained in:
dni ⚡ 2025-08-19 11:37:00 +02:00 committed by GitHub
parent 2daddf8b74
commit 67dc096909
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 66 additions and 49 deletions

View file

@ -75,7 +75,7 @@ migration = ["psycopg2-binary"]
[tool.poetry.group.dev.dependencies]
black = "^25.1.0"
mypy = "^1.11.2"
mypy = "^1.17.1"
types-protobuf = "^6.30.2.20250516"
pre-commit = "^4.2.0"
openapi-spec-validator = "^0.7.1"
@ -127,6 +127,13 @@ exclude = [
"^lnbits/extensions",
"^lnbits/upgrades",
]
plugins = "pydantic.mypy"
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[[tool.mypy.overrides]]
module = [