Skip to content

QMessageBox.StandardButtons.__init__ issues #128

Closed
@BryceBeagle

Description

@BryceBeagle

https://github.com/stlehmann/PyQt5-stubs/blob/a3b2eeba10cbd9db4a2840a3b2a53c15d31039c2/PyQt5-stubs/QtWidgets.pyi#L6575-L6580

There are a couple issues with the QMessageBox.StandardButtons constructor annotations.

Firstly, the second and third annotations are redundant; other than the args names, which I presume are both auto-generated and inaccurate. Neither are valid kwargs.

Secondly, it can also be constructed using int objects. As QMessageBox.StandardButton extends int, this annotation should just be replaced with using int objects.

>>> QtWidgets.QMessageBox.StandardButtons(0)
<PyQt5.QtWidgets.QMessageBox.StandardButtons object at 0x7f56c949dd60>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions