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

test: add type hints for test_storage #1023

Merged
merged 3 commits into from
Oct 2, 2023

Conversation

tonyandrewmeyer
Copy link
Contributor

  • Ignore the Nones passed when creating the framework - passing real values would be a lot of extra noise without actually gaining any value in the test
  • Add dummy methods to make the Serializable protocol match
  • Ignore types when replacing a (when type checking) property
  • Inherit from StoredStateData rather than Object to match the type of the Framework.save_snapshot method - the additional methods seem harmless in this case, and the meaning of the test seems unchanged
  • Sprinkle enough type hints so that pyright can tell what's happening

Partially addresses #1007

Copy link
Collaborator

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@benhoyt benhoyt merged commit ecc8052 into canonical:main Oct 2, 2023
20 checks passed
@benhoyt
Copy link
Collaborator

benhoyt commented Oct 2, 2023

Minor typing additions to test files, merged without further review.

@tonyandrewmeyer tonyandrewmeyer deleted the pyright-test_storage-1007 branch October 2, 2023 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants