You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When accessing the name of a column via .alias, the type checker complains, since the type is str | None. See the following example:
class MetricSchema(dy.Schema):
name = dy.String()
value = dy.Float64()
df.join(other_df, on=MetricSchema.name.alias)
# mypy will complain with something like
# error: Argument 2 to "join" of "Expr" has incompatible type "str | None"; expected "str"
Right now you either have to silence mypy with eg # type: ignore[arg-type] or define an extra string constant for column names. It would be nice to have a method similar to .col() that raises a ValueError if the column name is not set and otherwise returns the string name.