sbdchd / django-types

:doughnut: Type stubs for Django
MIT License
186 stars 62 forks source link

fix: Remove `Meta` from `Model` #215

Closed last-partizan closed 9 months ago

last-partizan commented 9 months ago

Pyright 1.1.339 enabled reportIncompatibleVariableOverride=true as part of new default "standard" mode.

https://github.com/microsoft/pyright/releases/tag/1.1.339

This leads to

error: "Meta" overrides symbol of same name in class "Model"

At runtime, models do not have Meta if it's not defined, so it's safe to remove it.

last-partizan commented 9 months ago

This still leaves the problem of inheriting from abstract models, but probably we cannot fix it at type stubs level.