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

refactor(typing): Reuse generated Literal aliases in api #3464

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

dangotbanned
Copy link
Member

@dangotbanned dangotbanned commented Jul 8, 2024

Following #3431 a number of these are now importable.

Additionally, I spotted the encodings parameter (e.g. in selection_point) was annotated with str, but should be constrained to only SingleDefUnitChannel_T.

Following vega#3431 a number of these are now importable.
Additionally, I spotted the `encodings` parameter was annotated with `str`, but should be restricted to the constraints of `SingleDefUnitChannel_T`.
@@ -3061,7 +3062,7 @@ def interactive(
copy of self, with interactive axes added

"""
encodings = []
encodings: list[SingleDefUnitChannel_T] = []
Copy link
Member Author

Choose a reason for hiding this comment

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

I've only annotated the 4x of these to satisfy mypy.

@binste
Copy link
Contributor

binste commented Jul 9, 2024

Thanks for further simplifying the maintenance of the type hints!

@binste binste merged commit e994fbd into vega:main Jul 9, 2024
12 checks passed
@dangotbanned dangotbanned deleted the reuse-type-alias branch July 11, 2024 20:10
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.

3 participants