News for hackers. Stuff that matters.
Re:Show HN: A Python Language Server, Mypy-compatible by zem on Friday June 27, 2025 @01:02PM (#44398394)
it's that django does metaprogramming that cannot be expressed in terms of python's static type annotations. you need dedicated plugins that essentially replicate that metaprogramming to generate the relevant types.

it's not just django btw, pretty much any metaprogramming library needs that sort of custom support, including dataclasses - take a look at any python type checker and you will find code specifically replicating what dataclasses does in terms of code generation. for pytype we actually put dataclass and namedtuple support alongside our other third-party plugins in the codebase.

There are no comments on this comment yet.