Skip to content

Commit ffbaf5c

Browse files
committed
Merge branch 'master' into StandardButton__or__
2 parents 0c37eba + a3b2eeb commit ffbaf5c

File tree

3 files changed

+51
-4
lines changed

3 files changed

+51
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7-
## 5.15.1.0 [unreleased]
7+
## 5.15.2.0 [unreleased]
88

99
### Added
10+
* [#125](https://github.com/stlehmann/PyQt5-stubs/pull/125) on `QtWidgets.QMessageBox`, enumerators are also attributes of their enumerations
1011
* [#99](https://github.com/stlehmann/PyQt5-stubs/pull/99) enable mypy's strict mode
1112
* [#92](https://github.com/stlehmann/PyQt5-stubs/pull/92) add `Sequence` methods and `.__setitem__()` to `sip.array`
1213
* [#94](https://github.com/stlehmann/PyQt5-stubs/pull/94) add several operators to `QIODevice.OpenMode` and `QIODevice.OpenModeFlag`
@@ -17,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1718

1819
### Changed
1920
* [#109](https://github.com/stlehmann/PyQt5-stubs/pull/109) `.__or__()` for `QMessageBox.StandardButton` and `QMessageBox.StandardButtons`
21+
* [#126](https://github.com/stlehmann/PyQt5-stubs/pull/126) fix `QCoreApplication.instance()` return type to be optional
2022
* [#102](https://github.com/stlehmann/PyQt5-stubs/pull/102) fix `pyqtSlot` parameter typing and overloads
2123
* [#104](https://github.com/stlehmann/PyQt5-stubs/pull/104) `sip.voidptr` handles integer values and sequences and takes `self`
2224
* [#103](https://github.com/stlehmann/PyQt5-stubs/pull/103) `pyqtBoundSignal.disconnect()`'s `slot` parameter is optional

PyQt5-stubs/QtCore.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3020,7 +3020,7 @@ class QCoreApplication(QObject):
30203020
@staticmethod
30213021
def exec_() -> int: ...
30223022
@staticmethod
3023-
def instance() -> 'QCoreApplication': ...
3023+
def instance() -> typing.Optional['QCoreApplication']: ...
30243024
@staticmethod
30253025
def arguments() -> typing.List[str]: ...
30263026
@staticmethod

PyQt5-stubs/QtWidgets.pyi

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6483,6 +6483,34 @@ class QMessageBox(QDialog):
64836483
@typing.overload
64846484
def __or__(self, other: int) -> int: ...
64856485

6486+
NoButton = ... # type: 'QMessageBox.StandardButton'
6487+
Ok = ... # type: 'QMessageBox.StandardButton'
6488+
Save = ... # type: 'QMessageBox.StandardButton'
6489+
SaveAll = ... # type: 'QMessageBox.StandardButton'
6490+
Open = ... # type: 'QMessageBox.StandardButton'
6491+
Yes = ... # type: 'QMessageBox.StandardButton'
6492+
YesToAll = ... # type: 'QMessageBox.StandardButton'
6493+
No = ... # type: 'QMessageBox.StandardButton'
6494+
NoToAll = ... # type: 'QMessageBox.StandardButton'
6495+
Abort = ... # type: 'QMessageBox.StandardButton'
6496+
Retry = ... # type: 'QMessageBox.StandardButton'
6497+
Ignore = ... # type: 'QMessageBox.StandardButton'
6498+
Close = ... # type: 'QMessageBox.StandardButton'
6499+
Cancel = ... # type: 'QMessageBox.StandardButton'
6500+
Discard = ... # type: 'QMessageBox.StandardButton'
6501+
Help = ... # type: 'QMessageBox.StandardButton'
6502+
Apply = ... # type: 'QMessageBox.StandardButton'
6503+
Reset = ... # type: 'QMessageBox.StandardButton'
6504+
RestoreDefaults = ... # type: 'QMessageBox.StandardButton'
6505+
FirstButton = ... # type: 'QMessageBox.StandardButton'
6506+
LastButton = ... # type: 'QMessageBox.StandardButton'
6507+
YesAll = ... # type: 'QMessageBox.StandardButton'
6508+
NoAll = ... # type: 'QMessageBox.StandardButton'
6509+
Default = ... # type: 'QMessageBox.StandardButton'
6510+
Escape = ... # type: 'QMessageBox.StandardButton'
6511+
FlagMask = ... # type: 'QMessageBox.StandardButton'
6512+
ButtonMask = ... # type: 'QMessageBox.StandardButton'
6513+
64866514
NoButton = ... # type: 'QMessageBox.StandardButton'
64876515
Ok = ... # type: 'QMessageBox.StandardButton'
64886516
Save = ... # type: 'QMessageBox.StandardButton'
@@ -6511,14 +6539,31 @@ class QMessageBox(QDialog):
65116539
FlagMask = ... # type: 'QMessageBox.StandardButton'
65126540
ButtonMask = ... # type: 'QMessageBox.StandardButton'
65136541

6514-
class Icon(int): ...
6542+
class Icon(int):
6543+
NoIcon = ... # type: 'QMessageBox.Icon'
6544+
Information = ... # type: 'QMessageBox.Icon'
6545+
Warning = ... # type: 'QMessageBox.Icon'
6546+
Critical = ... # type: 'QMessageBox.Icon'
6547+
Question = ... # type: 'QMessageBox.Icon'
6548+
65156549
NoIcon = ... # type: 'QMessageBox.Icon'
65166550
Information = ... # type: 'QMessageBox.Icon'
65176551
Warning = ... # type: 'QMessageBox.Icon'
65186552
Critical = ... # type: 'QMessageBox.Icon'
65196553
Question = ... # type: 'QMessageBox.Icon'
65206554

6521-
class ButtonRole(int): ...
6555+
class ButtonRole(int):
6556+
InvalidRole = ... # type: 'QMessageBox.ButtonRole'
6557+
AcceptRole = ... # type: 'QMessageBox.ButtonRole'
6558+
RejectRole = ... # type: 'QMessageBox.ButtonRole'
6559+
DestructiveRole = ... # type: 'QMessageBox.ButtonRole'
6560+
ActionRole = ... # type: 'QMessageBox.ButtonRole'
6561+
HelpRole = ... # type: 'QMessageBox.ButtonRole'
6562+
YesRole = ... # type: 'QMessageBox.ButtonRole'
6563+
NoRole = ... # type: 'QMessageBox.ButtonRole'
6564+
ResetRole = ... # type: 'QMessageBox.ButtonRole'
6565+
ApplyRole = ... # type: 'QMessageBox.ButtonRole'
6566+
65226567
InvalidRole = ... # type: 'QMessageBox.ButtonRole'
65236568
AcceptRole = ... # type: 'QMessageBox.ButtonRole'
65246569
RejectRole = ... # type: 'QMessageBox.ButtonRole'

0 commit comments

Comments
 (0)