Skip to content

Partially unknown type for some Chart methods. #3870

@alec-bike

Description

@alec-bike

What happened?

I'm getting type checking (basedpyright) reportUnknownMemberType warnings for some Chart methods, such as mark_* and save. Others, like encode, are fine. Does not affect functionality, just trips up the type-checker.

Example:

from altair import Chart

Chart(df.unpivot(on=matches(regex), index=idx, value_name=ylab))
        .mark_line()
        .encode(x=idx, y=ylab, color="variable")

basedpyright output:

Type of "mark_line" is partially unknown
  Type of "mark_line" is "(align: Parameter | SchemaBase
          ...
          **kwds: Unknown) -> Chart" (basedpyright reportUnknownMemberType)

What would you like to happen instead?

No warnings.

Which version of Altair are you using?

6.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds-triageBug report needs maintainer response

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions