Skip to content

The rest #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Sep 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PyQt5-stubs/Qt3DCore.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -497,4 +497,4 @@ class QTransform('QComponent'):
def scale3D(self) -> QtGui.QVector3D: ...
def scale(self) -> float: ...

def qIdForNode(self, node: 'QNode') -> 'QNodeId': ...
def qIdForNode(node: 'QNode') -> 'QNodeId': ...
3 changes: 2 additions & 1 deletion PyQt5-stubs/QtCore.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import typing
from PyQt5 import sip
from PyQt5 import QtCore
import enum # import was missing

# Support for QDate, QDateTime and QTime.
Expand Down Expand Up @@ -6220,7 +6221,7 @@ class QMetaType(sip.simplewrapper):

def __init__(self, type: int = ...) -> None: ...

def name(self) -> QByteArray: ...
def name(self) -> QtCore.QByteArray: ...
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def id(self) -> int: ...
@staticmethod
def metaObjectForType(type: int) -> 'QMetaObject': ...
Expand Down
2 changes: 1 addition & 1 deletion PyQt5-stubs/QtDataVisualization.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ class QValue3DAxis('QAbstract3DAxis'):
def segmentCount(self) -> int: ...
def setSegmentCount(self, count: int) -> None: ...

def qDefaultSurfaceFormat(self, antialias: bool = ...) -> QtGui.QSurfaceFormat: ...
def qDefaultSurfaceFormat(antialias: bool = ...) -> QtGui.QSurfaceFormat: ...


PYQT_DATAVISUALIZATION_VERSION = ... # type: int
Expand Down
2 changes: 1 addition & 1 deletion PyQt5-stubs/QtDesigner.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ class QPyDesignerTaskMenuExtension(QtCore.QObject, QDesignerTaskMenuExtension):
def __init__(self, parent: QtCore.QObject) -> None: ...


class QPyDesignerPropertySheetExtension(QtCore.QObject, QDesignerPropertySheetExtension):
class QPyDesignerPropertySheetExtension(QtCore.QObject, QDesignerPropertySheetExtension): # type: ignore[misc]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PyQt5-stubs/QtDesigner.pyi:476: error: Definition of "property" in base class "QObject" is incompatible with definition in base class "QDesignerPropertySheetExtension"  [misc]
PyQt5-stubs/QtDesigner.pyi:476: error: Definition of "setProperty" in base class "QObject" is incompatible with definition in base class "QDesignerPropertySheetExtension"  [misc]


def __init__(self, parent: QtCore.QObject) -> None: ...

Expand Down
2 changes: 1 addition & 1 deletion PyQt5-stubs/QtQuick.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class QQuickItem(QtCore.QObject, QtQml.QQmlParserStatus):
@typing.overload
def __init__(self, v: float) -> None: ...
@typing.overload
def __init__(self, v: bool) -> None: ...
def __init__(self, v: bool) -> None: ... # type: ignore[misc]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PyQt5-stubs/QtQuick.pyi:106: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader  [misc]

@typing.overload
def __init__(self, a0: 'QQuickItem.ItemChangeData') -> None: ...

Expand Down
19 changes: 16 additions & 3 deletions PyQt5-stubs/sip.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# POSSIBILITY OF SUCH DAMAGE.


from typing import overload, Sequence, TypeVar, Union
from typing import overload, Generic, Iterable, Sequence, TypeVar, Union


# Constants.
Expand All @@ -40,11 +40,24 @@ class wrapper(simplewrapper): ...
Buffer = Union['array', 'voidptr', str, bytes, bytearray]


T = TypeVar("T")
_T = TypeVar("_T")


# The array type.
class array(Sequence[T]): ...
class array(Sequence[_T], Generic[_T]):
@overload
def __delitem__(self, key: int) -> None: ...
@overload
def __delitem__(self, key: slice) -> None: ...
Comment on lines +48 to +51
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be a Union but I figured consistency would be just as well.

@overload
def __getitem__(self, key: int) -> _T: ...
@overload
def __getitem__(self, key: slice) -> "array[_T]": ...
def __len__(self) -> int: ...
@overload
def __setitem__(self, key: int, value: _T) -> None: ...
@overload
def __setitem__(self, key: slice, value: Iterable[_T]) -> None: ...


# The voidptr type.
Expand Down