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

Make mypy pass #92

Merged
merged 5 commits into from
Oct 27, 2022
Merged

Make mypy pass #92

merged 5 commits into from
Oct 27, 2022

Conversation

block-chaynes
Copy link
Contributor

Changes needed in order for mypy to pass

This also fixes a few bugs and some incorrect type hints.

Bugs:

  • open_rarity/models/token_metadata.py was using datetime.fromtimestamp but should have been datetime.datetime.fromtimestamp
  • RankResolver.get_all_ranks had a definition that didn't match the child implementations
  • in open_rarity/resolver/testset_resolver.py the method resolve_collection_data was returning a dict rather than a list as the types and docs implied

Bug left unresolved:

  • in open_rarity/resolver/testset_resolver.py the extract_rank method assumes the token_identifier has a token_id field, but this is not true for SolanaMintAddressTokenIdentifier. I'm ignoring the type error for now

@block-chaynes block-chaynes changed the title Chad/fix mypy Make mypy pass Oct 26, 2022
Copy link
Contributor

@vickygos vickygos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments but lgtm. Thanks for doing this!

@vickygos vickygos merged commit eb6a7a1 into OpenRarity:main Oct 27, 2022
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.

3 participants