Skip to content

Commit

Permalink
Merge pull request #43 from stlehmann/Update-to-PyQt5.14.2
Browse files Browse the repository at this point in the history
Update stubs to PyQt5.14.2
  • Loading branch information
stlehmann authored May 2, 2020
2 parents a2f02d7 + 5b89051 commit 0ed68e3
Show file tree
Hide file tree
Showing 11 changed files with 1,927 additions and 776 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.

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

## 5.14.2.2 [unreleased]

### Added

### Changed
* [#43](https://github.com/stlehmann/PyQt5-stubs/pull/43) Update stubs to PyQt5.14.2

### Removed

## 5.14.2.1

### Added
Expand All @@ -16,4 +25,4 @@ like QtWebEngine and Qt3D
### Changed
* [#38](https://github.com/stlehmann/PyQt5-stubs/pull/38) Changed license to GPLv3 to be compilient with PyQt5 license

### Fixed
### Removed
734 changes: 677 additions & 57 deletions PyQt5-stubs/QtCore.pyi

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions PyQt5-stubs/QtDBus.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The PEP 484 type hints stub file for the QtDBus module.
#
# Generated by SIP 5.1.2
# Generated by SIP 5.2.0
#
# Copyright (c) 2020 Riverbank Computing Limited <[email protected]>
#
Expand Down Expand Up @@ -249,6 +249,7 @@ class QDBusConnectionInterface(QDBusAbstractInterface):
def unregisterService(self, serviceName: str) -> 'QDBusReply': ...
def serviceOwner(self, name: str) -> 'QDBusReply': ...
def isServiceRegistered(self, serviceName: str) -> 'QDBusReply': ...
def activatableServiceNames(self) -> 'QDBusReply': ...
def registeredServiceNames(self) -> 'QDBusReply': ...


Expand Down Expand Up @@ -358,6 +359,8 @@ class QDBusMessage(sip.simplewrapper):
@typing.overload
def __init__(self, other: 'QDBusMessage') -> None: ...

def isInteractiveAuthorizationAllowed(self) -> bool: ...
def setInteractiveAuthorizationAllowed(self, enable: bool) -> None: ...
@staticmethod
def createTargetedSignal(service: str, path: str, interface: str, name: str) -> 'QDBusMessage': ...
def swap(self, other: 'QDBusMessage') -> None: ...
Expand Down Expand Up @@ -513,4 +516,3 @@ class QDBusPendingReply(QDBusPendingCall):
def isError(self) -> bool: ...
def error(self) -> QDBusError: ...
def argumentAt(self, index: int) -> typing.Any: ...

714 changes: 664 additions & 50 deletions PyQt5-stubs/QtGui.pyi

Large diffs are not rendered by default.

155 changes: 151 additions & 4 deletions PyQt5-stubs/QtNetwork.pyi

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion PyQt5-stubs/QtOpenGL.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The PEP 484 type hints stub file for the QtOpenGL module.
#
# Generated by SIP 5.1.2
# Generated by SIP 5.2.0
#
# Copyright (c) 2020 Riverbank Computing Limited <[email protected]>
#
Expand Down
19 changes: 10 additions & 9 deletions PyQt5-stubs/QtPrintSupport.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The PEP 484 type hints stub file for the QtPrintSupport module.
#
# Generated by SIP 5.1.2
# Generated by SIP 5.2.0
#
# Copyright (c) 2020 Riverbank Computing Limited <[email protected]>
#
Expand Down Expand Up @@ -116,7 +116,7 @@ class QPrintDialog(QAbstractPrintDialog):
@typing.overload
def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ...

@typing.overload # type: ignore # fix issue #1
@typing.overload # type: ignore
def accepted(self) -> None: ...
@typing.overload
def accepted(self, printer: 'QPrinter') -> None: ...
Expand Down Expand Up @@ -258,12 +258,14 @@ class QPrinter(QtGui.QPagedPaintDevice):
@typing.overload
def __init__(self, printer: 'QPrinterInfo', mode: 'QPrinter.PrinterMode' = ...) -> None: ...

def pdfVersion(self) -> QtGui.QPagedPaintDevice.PdfVersion: ...
def setPdfVersion(self, version: QtGui.QPagedPaintDevice.PdfVersion) -> None: ...
def paperName(self) -> str: ...
def setPaperName(self, paperName: str) -> None: ...
def setEngines(self, printEngine: QPrintEngine, paintEngine: QtGui.QPaintEngine) -> None: ...
def metric(self, a0: QtGui.QPaintDevice.PaintDeviceMetric) -> int: ...
def getPageMargins(self, unit: 'QPrinter.Unit') -> typing.Tuple[float, float, float, float]: ...
def setPageMargins(self, left: float, top: float, right: float, bottom: float, unit: 'QPrinter.Unit') -> None: ... # type: ignore # fix issue #1
def setPageMargins(self, left: float, top: float, right: float, bottom: float, unit: 'QPrinter.Unit') -> None: ... # type: ignore
def setMargins(self, m: QtGui.QPagedPaintDevice.Margins) -> None: ...
def printRange(self) -> 'QPrinter.PrintRange': ...
def setPrintRange(self, range: 'QPrinter.PrintRange') -> None: ...
Expand Down Expand Up @@ -342,6 +344,8 @@ class QPrinterInfo(sip.simplewrapper):
@typing.overload
def __init__(self, printer: QPrinter) -> None: ...

def supportedColorModes(self) -> typing.List[QPrinter.ColorMode]: ...
def defaultColorMode(self) -> QPrinter.ColorMode: ...
def supportedDuplexModes(self) -> typing.List[QPrinter.DuplexMode]: ...
def defaultDuplexMode(self) -> QPrinter.DuplexMode: ...
@staticmethod
Expand Down Expand Up @@ -379,7 +383,7 @@ class QPrintPreviewDialog(QtWidgets.QDialog):
@typing.overload
def __init__(self, printer: QPrinter, parent: typing.Optional[QtWidgets.QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ...

paintRequested: QtCore.pyqtSignal # fix issue #5
paintRequested: QtCore.pyqtSignal

def done(self, result: int) -> None: ...
def printer(self) -> QPrinter: ...
Expand Down Expand Up @@ -407,12 +411,9 @@ class QPrintPreviewWidget(QtWidgets.QWidget):
@typing.overload
def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ...

previewChanged: QtCore.pyqtSignal # fix issue #5
paintRequested: QtCore.pyqtSignal # fix issue #5

def pageCount(self) -> int: ...
# def previewChanged(self) -> None: ...
# def paintRequested(self, printer: QPrinter) -> None: ...
previewChanged: QtCore.pyqtSignal
paintRequested: QtCore.pyqtSignal
def updatePreview(self) -> None: ...
def setAllPagesViewMode(self) -> None: ...
def setFacingPagesViewMode(self) -> None: ...
Expand Down
19 changes: 15 additions & 4 deletions PyQt5-stubs/QtSql.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The PEP 484 type hints stub file for the QtSql module.
#
# Generated by SIP 5.1.2
# Generated by SIP 5.2.0
#
# Copyright (c) 2020 Riverbank Computing Limited <[email protected]>
#
Expand Down Expand Up @@ -77,10 +77,14 @@ class QSqlDatabase(sip.simplewrapper):
def removeDatabase(connectionName: str) -> None: ...
@staticmethod
def database(connectionName: str = ..., open: bool = ...) -> 'QSqlDatabase': ...
@typing.overload
@staticmethod
def cloneDatabase(other: 'QSqlDatabase', connectionName: str) -> 'QSqlDatabase': ...
@typing.overload
@staticmethod
def cloneDatabase(other: str, connectionName: str) -> 'QSqlDatabase': ...
@typing.overload
@staticmethod
def addDatabase(type: str, connectionName: str = ...) -> 'QSqlDatabase': ...
@typing.overload
@staticmethod
Expand Down Expand Up @@ -216,6 +220,7 @@ class QSqlError(sip.simplewrapper):
@typing.overload
def __init__(self, other: 'QSqlError') -> None: ...

def swap(self, other: 'QSqlError') -> None: ...
def nativeErrorCode(self) -> str: ...
def isValid(self) -> bool: ...
def text(self) -> str: ...
Expand All @@ -239,8 +244,12 @@ class QSqlField(sip.simplewrapper):
@typing.overload
def __init__(self, fieldName: str = ..., type: QtCore.QVariant.Type = ...) -> None: ...
@typing.overload
def __init__(self, fieldName: str, type: QtCore.QVariant.Type, tableName: str) -> None: ...
@typing.overload
def __init__(self, other: 'QSqlField') -> None: ...

def tableName(self) -> str: ...
def setTableName(self, tableName: str) -> None: ...
def isValid(self) -> bool: ...
def isGenerated(self) -> bool: ...
def typeID(self) -> int: ...
Expand Down Expand Up @@ -412,6 +421,7 @@ class QSqlQueryModel(QtCore.QAbstractTableModel):

def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ...

def roleNames(self) -> typing.Dict[int, QtCore.QByteArray]: ...
def endRemoveColumns(self) -> None: ...
def beginRemoveColumns(self, parent: QtCore.QModelIndex, first: int, last: int) -> None: ...
def endInsertColumns(self) -> None: ...
Expand Down Expand Up @@ -451,6 +461,7 @@ class QSqlRelationalDelegate(QtWidgets.QItemDelegate):

def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ...

def setEditorData(self, editor: QtWidgets.QWidget, index: QtCore.QModelIndex) -> None: ...
def setModelData(self, editor: QtWidgets.QWidget, model: QtCore.QAbstractItemModel, index: QtCore.QModelIndex) -> None: ...
def createEditor(self, parent: QtWidgets.QWidget, option: QtWidgets.QStyleOptionViewItem, index: QtCore.QModelIndex) -> QtWidgets.QWidget: ...

Expand Down Expand Up @@ -481,13 +492,13 @@ class QSqlTableModel(QSqlQueryModel):
def __init__(self, parent: typing.Optional[QtCore.QObject] = ..., db: QSqlDatabase = ...) -> None: ...

def primaryValues(self, row: int) -> QSqlRecord: ...
@typing.overload # type: ignore # fix issue #1
@typing.overload # type: ignore
def record(self) -> QSqlRecord: ...
@typing.overload
def record(self, row: int) -> QSqlRecord: ...
def selectRow(self, row: int) -> bool: ...
def indexInQuery(self, item: QtCore.QModelIndex) -> QtCore.QModelIndex: ...
def setQuery(self, query: QSqlQuery) -> None: ... # type: ignore # fix issue #1
def setQuery(self, query: QSqlQuery) -> None: ... # type: ignore
def setPrimaryKey(self, key: QSqlIndex) -> None: ...
def selectStatement(self) -> str: ...
def orderByClause(self) -> str: ...
Expand All @@ -512,7 +523,7 @@ class QSqlTableModel(QSqlQueryModel):
def setFilter(self, filter: str) -> None: ...
def filter(self) -> str: ...
def setSort(self, column: int, order: QtCore.Qt.SortOrder) -> None: ...
def sort(self, column: int, order: QtCore.Qt.SortOrder) -> None: ... # type: ignore # fix issue #1
def sort(self, column: int, order: QtCore.Qt.SortOrder) -> None: ... # type: ignore
def fieldIndex(self, fieldName: str) -> int: ...
def database(self) -> QSqlDatabase: ...
def primaryKey(self) -> QSqlIndex: ...
Expand Down
39 changes: 31 additions & 8 deletions PyQt5-stubs/QtTest.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The PEP 484 type hints stub file for the QtTest module.
#
# Generated by SIP 5.1.2
# Generated by SIP 5.2.0
#
# Copyright (c) 2020 Riverbank Computing Limited <[email protected]>
#
Expand Down Expand Up @@ -41,9 +41,28 @@ PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int],
typing.Sequence[float], sip.Buffer, int, None]


class QAbstractItemModelTester(QtCore.QObject):

class FailureReportingMode(int): ...
QtTest = ... # type: 'QAbstractItemModelTester.FailureReportingMode'
Warning = ... # type: 'QAbstractItemModelTester.FailureReportingMode'
Fatal = ... # type: 'QAbstractItemModelTester.FailureReportingMode'

@typing.overload
def __init__(self, model: QtCore.QAbstractItemModel, parent: typing.Optional[QtCore.QObject] = ...) -> None: ...
@typing.overload
def __init__(self, model: QtCore.QAbstractItemModel, mode: 'QAbstractItemModelTester.FailureReportingMode', parent: typing.Optional[QtCore.QObject] = ...) -> None: ...

def failureReportingMode(self) -> 'QAbstractItemModelTester.FailureReportingMode': ...
def model(self) -> QtCore.QAbstractItemModel: ...


class QSignalSpy(QtCore.QObject):

def __init__(self, signal: QtCore.pyqtBoundSignal) -> None: ... # add QtCore
@typing.overload
def __init__(self, signal: QtCore.pyqtBoundSignal) -> None: ...
@typing.overload
def __init__(self, obj: QtCore.QObject, signal: QtCore.QMetaMethod) -> None: ...

def __delitem__(self, i: int) -> None: ...
def __setitem__(self, i: int, value: typing.Iterable[typing.Any]) -> None: ...
Expand Down Expand Up @@ -115,21 +134,25 @@ class QTest(sip.simplewrapper):
@typing.overload
def mouseClick(self, window: QtGui.QWindow, button: QtCore.Qt.MouseButton, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., pos: QtCore.QPoint = ..., delay: int = ...) -> None: ...
@typing.overload
def keySequence(self, widget: QtWidgets.QWidget, keySequence: typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int]) -> None: ...
@typing.overload
def keySequence(self, window: QtGui.QWindow, keySequence: typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int]) -> None: ...
@typing.overload
def keyRelease(self, widget: QtWidgets.QWidget, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ...
@typing.overload
def keyRelease(self, widget: QtWidgets.QWidget, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ...
def keyRelease(self, widget: QtWidgets.QWidget, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... # type: ignore
@typing.overload
def keyRelease(self, window: QtGui.QWindow, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ...
@typing.overload
def keyRelease(self, window: QtGui.QWindow, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ...
def keyRelease(self, window: QtGui.QWindow, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... # type: ignore
@typing.overload
def keyPress(self, widget: QtWidgets.QWidget, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ...
@typing.overload
def keyPress(self, widget: QtWidgets.QWidget, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ...
def keyPress(self, widget: QtWidgets.QWidget, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... # type: ignore
@typing.overload
def keyPress(self, window: QtGui.QWindow, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ...
@typing.overload
def keyPress(self, window: QtGui.QWindow, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ...
def keyPress(self, window: QtGui.QWindow, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... # type: ignore
@typing.overload
def keyEvent(self, action: 'QTest.KeyAction', widget: QtWidgets.QWidget, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ...
@typing.overload
Expand All @@ -142,9 +165,9 @@ class QTest(sip.simplewrapper):
@typing.overload
def keyClick(self, widget: QtWidgets.QWidget, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ...
@typing.overload
def keyClick(self, widget: QtWidgets.QWidget, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ...
def keyClick(self, widget: QtWidgets.QWidget, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... # type: ignore
@typing.overload
def keyClick(self, window: QtGui.QWindow, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ...
@typing.overload
def keyClick(self, window: QtGui.QWindow, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ...
def keyClick(self, window: QtGui.QWindow, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... # type: ignore
def qSleep(self, ms: int) -> None: ...
Loading

0 comments on commit 0ed68e3

Please sign in to comment.