Add type hints to the codebase#117
Conversation
|
That's a good first step. We want to get stronger type checking in place in the scope of #79 We'll try to review this in the coming days, thanks for contributing ! |
e3krisztian
left a comment
There was a problem hiding this comment.
It is a nice PR, I think it should be merged.
Although I added some comments, those are very minor and kind of nitpicking looking at the size of changes.
863bb2d to
5beabed
Compare
e3krisztian
left a comment
There was a problem hiding this comment.
Thanks for the update!
I have found this new "problem", I have skipped over earlier, but otherwise, it looks very good!
I would split off _LayoutPair(?) from _LayoutInfo, and revert the code change in associate_blocks - only casting the result in the return. I think it would result in new typing problem in associate_blocks, but that should be OK - a reminder to fix it later.
61db1cf to
f8857fb
Compare
f8857fb to
9c7d477
Compare
This PR adds type hints to the codebase without making any other changes.
There are a few type errors that get picked up by the likes of
mypy,ty,pyright, but resolving those requires changes to the code, which I wanted to avoid in this PR.I tested the scripts with Python 3.9 (the min version as per the project.toml) to verify it still works.