Skip to content

[BUG] DataTable cell_style_conditional type hint does not include the style itself #3342

Open
@tlauli

Description

@tlauli
  • replace the result of pip list | grep dash below
dash                        3.0.4
dash_ag_grid                31.3.1
dash_auth                   2.3.0
dash-bootstrap-components   2.0.3
dash-bootstrap-templates    2.1.0

Describe the bug

The type hint for the cell_style_conditional parameter of DataTable is typing.Optional[typing.Sequence["StyleCellConditional"]] = None, where StyleCellConditional = TypedDict("StyleCellConditional", {"if": NotRequired["StyleCellConditionalIf"]}). This type hint includes only the if key, leaving no space for the style itself. Thus every meaningful assignment to this parameter must be excluded from type checking.
Other conditional styles have the same issue.

Expected behavior

It is not necessary to exclude assignments to this parameter from type checking. Preferably with the if key still being typed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions