Skip to content

Commit 343aada

Browse files
authored
Merge pull request #103 from altendky/pyqtBoundSignal_disconnect_optional
`pyqtBoundSignal.disconnect()`'s `slot` parameter is optional
2 parents 7cbaf41 + 2fc7c46 commit 343aada

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1515
* [#51](https://github.com/stlehmann/PyQt5-stubs/pull/51) adds `pyqtBoundSignal.signal` hinted as `str`
1616

1717
### Changed
18+
* [#103](https://github.com/stlehmann/PyQt5-stubs/pull/103) `pyqtBoundSignal.disconnect()`'s `slot` parameter is optional
1819
* [#100](https://github.com/stlehmann/PyQt5-stubs/pull/100) fill generic parameter as `sip.array[int]` for QtDataVisualization textures
1920
* [#92](https://github.com/stlehmann/PyQt5-stubs/pull/92) remove self from `qDefaultSurfaceFormat()` and `qIdForNode()`
2021
* [#83](https://github.com/stlehmann/PyQt5-stubs/pull/83) fixes `sip.array` to be generic

PyQt5-stubs/QtCore.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ class pyqtBoundSignal:
3535

3636
def emit(self, *args: typing.Any) -> None: ...
3737
def connect(self, slot: "PYQT_SLOT") -> "QMetaObject.Connection": ...
38-
def disconnect(self, slot: typing.Union["PYQT_SLOT", "QMetaObject.Connection"]=None) -> None: ...
38+
@typing.overload
39+
def disconnect(self) -> None: ...
40+
@typing.overload
41+
def disconnect(self, slot: typing.Union["PYQT_SLOT", "QMetaObject.Connection"]) -> None: ...
3942

4043

4144
class pyqtSignal:

0 commit comments

Comments
 (0)