Skip to content
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

feat: type annotations now allow strict type checking #127

Merged
merged 4 commits into from
May 27, 2024

Conversation

michalc
Copy link
Member

@michalc michalc commented May 27, 2024

This changes the internal tuple type to make the uncompressed size and crc_32 non optional ints which makes it possible to pass type checking without any ifs or casts. This is still slightly odd maybe because it means we hard code them to 0 when they're not used. A "better" structure might be to have some sort of more dynamic structure to avoid this - maybe multiple tuples or a more complex class. However, suspect this is still a small step forward since it allows strict type checking.

This changes the internal tuple type to make the uncompressed size and crc_32
non optional ints which makes it possible to pass type checking without any ifs
or casts. This is still slightly odd maybe because it means we hard code them
to 0 when they're not used. A "better" structure might be to have some sort of
more dynamic structure to avoid this - maybe multiple tuples or a more complex
class. However, suspect this is still a small step forward since it allows
strict type checking.
@michalc michalc force-pushed the feat/final-types-to-enable-strict-type-checking branch from a7015f9 to 2af9797 Compare May 27, 2024 06:13
@michalc michalc merged commit 1d8a18a into main May 27, 2024
5 checks passed
@michalc michalc deleted the feat/final-types-to-enable-strict-type-checking branch May 27, 2024 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant