-
Notifications
You must be signed in to change notification settings - Fork 147
Add type hints to the codebase #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
e3krisztian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
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.