Skip to content

Inconsistent exportselection type in tkinter #11389

@MarcellPerger1

Description

@MarcellPerger1

The types for the exportselection argument in tkinter methods are inconsistent.
In 7 out of the 8 occurrences, the type is bool, but in the 1 other occurrence (in Listbox.__init__) the type is int:

exportselection: int = ...,

It seems that some code passes 0 or 1 instead of a bool (see #4765) so it would make sense for all of these types to be int. Or bool | Literal[0, 1] is probably better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions