vega / altair

Declarative statistical visualization library for Python
https://altair-viz.github.io/
BSD 3-Clause "New" or "Revised" License
9.25k stars 789 forks source link

chore: Future-proof Duration type error message test #3606

Closed MarcoGorelli closed 1 week ago

MarcoGorelli commented 1 week ago

In Narwhals we'd like to change the dtype repr to show the time unit (and, for Datetimes, the time zone)

This doesn't really have an impact on users, they'd just see

Field "timedelta" has type "Duration(time_unit='ns')" which is not supported by Altair

instead of

Field "timedelta" has type "Duration" which is not supported by Altair

This PR just future-proofs the Altair test