Use Python type hinting
It's 2025 and the Python world has now embraced type hinting. I won't lay out the case for this practice in general, because plenty has been written about it.
For WP1, the most immediate benefits I see are:
- Knowing when you're working with
b'bytes'from the DB (as opposed to a'string', because the DB stores only bytes for legacy reasons - Knowing when you're dealing with a UUID versus a "regular" string.
@benoit74 @rgaudin Would love to get your opinions on this. I think it would definitely be beneficial, but might be a lot of work. But I have done typing migrations in the past (Javascript -> Typescript) and I've actually found that you can find some bugs when you do this work.
Not sure if it's worth the effort though.
There is definitely a huge added value, this is our default requirement for new projet.
Regarding whether if it is worth the effort, it is a bit hard to say since it depends on the effort which depends on current WP1 code.
We've done the migration of python-scraperlib for instance and some parts have required very significant changes but even that was deemed worth the effort (and I'm still sure it is) because it allows to trap so many mistakes and errors, especially as code evolves.
I can only encourage you to implement this issue!