Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not sure about Django + Ty specifically, but some dependencies need a plugin because they're impossible to type annotate otherwise. For example, sqlalchemy + mypy
 help



Exactly. Why are we baking support for this or that package to the core instead of enabling plugins or just making the type system more expressive?

Another commenter explained pretty well why Django is "special" here: https://news.ycombinator.com/item?id=50720035

It takes a great effort and time to push things like PEP747 forward and when you manage, perhaps you need to wait several years until the lowest supported version of python implements the changes you wanted.

[dead]


pydantic needed the mypy plugin from the beginning because their types meant something different than the python semantics. For example pydantic allowed "a: int = None" which is an error for mypy.

This is allowed by mypy if the implicit_optional option is set.

https://mypy.readthedocs.io/en/stable/config_file.html#confv...





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: