Skip to content

Investigate mypy warning alt.theme.register #3789

Description

@dangotbanned

What happened?

Causing an upstream warning in https://github.com/narwhals-dev/narwhals/actions/runs/13154290048/job/36707803255

altair/theme.py:251: error: ParamSpec "P" is unbound  [valid-type]
            def wrapper(*args: P.args, **kwargs: P.kwargs) -> ThemeConfig:
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error in 1 file (checked 383 source files)

altair/altair/theme.py

Lines 250 to 252 in 7fce53d

@_wraps(func)
def wrapper(*args: P.args, **kwargs: P.kwargs) -> ThemeConfig:
return func(*args, **kwargs)

Seems like mypy has suddenly decided it doesn't know about

P = ParamSpec("P")

What would you like to happen instead?

Not trigger a failure in narwhals

Which version of Altair are you using?

7fce53d

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions