You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find that Python is significantly easier to write and maintain when it's statically typed via mypy. It's fairly easy to add types incrementally. Here's a good post on how Zulip started using it (also a Django project, albeit larger than Bookwyrm) talking about benefits and approaches to migrating.
The steps for this would probably look like:
Get mypy running on the codebase without annotations, using # type: ignore where needed
Add mypy to test script / CI
Require type annotations, but exempt all existing code on a per-module basis. This will require new modules to be typed, without requiring huge changes all at once.
Slowly, over time, add type annotations for existing modules, and remove the exemptions as we do so.
I'd be happy to drive this if it's something people are open to.
The text was updated successfully, but these errors were encountered:
I find that Python is significantly easier to write and maintain when it's statically typed via mypy. It's fairly easy to add types incrementally. Here's a good post on how Zulip started using it (also a Django project, albeit larger than Bookwyrm) talking about benefits and approaches to migrating.
The steps for this would probably look like:
# type: ignore
where neededI'd be happy to drive this if it's something people are open to.
The text was updated successfully, but these errors were encountered: