Skip to content

Comments

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

Merged
binste merged 1 commit intovega:mainfrom
dangotbanned:reuse-type-alias
Jul 9, 2024
Merged

refactor(typing): Reuse generated Literal aliases in api#3464
binste merged 1 commit intovega:mainfrom
dangotbanned:reuse-type-alias

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`.

"""
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!

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