What happened?
I have noticed that several methods use list type hints instead of Sequence (which is covariant). For example:
|
def transform_aggregate( |
|
self, |
|
aggregate: Optional[list[AggregatedFieldDef]] = Undefined, |
|
groupby: Optional[list[str | FieldName]] = Undefined, |
|
**kwds: dict[str, Any] | str, |
|
) -> Self: |
What would you like to happen instead?
All instances of list in type hints for various mixins should be replaced with Sequence (or potentially Collection, if applicable).
I think there is some level of codegen involved for the files in vegalite/v6/, so I'm not so sure where to start if I were to make a PR.
Which version of Altair are you using?
main branch
What happened?
I have noticed that several methods use
listtype hints instead ofSequence(which is covariant). For example:altair/altair/vegalite/v6/api.py
Lines 2696 to 2701 in 58661c6
What would you like to happen instead?
All instances of
listin type hints for various mixins should be replaced withSequence(or potentiallyCollection, if applicable).I think there is some level of codegen involved for the files in
vegalite/v6/, so I'm not so sure where to start if I were to make a PR.Which version of Altair are you using?
main branch