I am looking for large Python projects that have completed transition to the type system successfully. So far, I know about urllib3, and w3lib. I also know about typeshed. Which others? And any observations from those who attempted the transition?
Flask recently added type stubs, around the time 2.0 was being released. Turns out it was rather easy(?) because it didn’t take that long, was done by a single contributor and took 800 lines of type hints.
As for my experience with adding types to a project, it’s usually fairly seamless, and more often than not, you’ll end up finding subtle bugs in your code instead of the type checker getting in the way.
Thanks! Much appreciated.
Zulip project is using mypy since 2016 and has around ~1600 files.
pip is pretty heavily annotated, though not 100%
Thanks! I will check that out.
Not open source and I’m not able to confirm this personally but instagram?
Thanks! I want to have a look at the commits at least, so I can see what kind of discussions took place.
I’m curious on why you are asking. Having the project contributors’s buy in and commitment is really essential to success. For a large project, consider how Dropbox completed type checking across most of its Python code.
I want to know what decisions were made in the process. For example, how far did you go in converting certain data structures to use types, and where did you leave it for future (or never), and why, how much of the project were you able to convert, did it result in some of the tests being removed/added?.
I see. I’ve only converted small projects with less than 50 files. I was able do conversions one package at a time and complete the conversion over a period of multiple commits.
Thanks! Do you have these project repositories online somewhere?