Add type annotations to catch typing bugs
I had an issue where the reservation date for G5K jobs is sometimes a string, sometimes a float (unix timestamp). One part of Enoslib (or possibly python-grid5000) did not expect a float and crashed.
Adding type hints in the code and having appropriate tooling in the CI would help catch these kind of bugs.
Interesting blog posts on the subject:
https://sethmlarson.dev/blog/tests-arent-enough-case-study-after-adding-types-to-urllib3 https://medium.com/alan/python-typing-with-mypy-progressive-type-checking-on-a-large-code-base-74e13356bd3a