Skip to content

Commit 0c37eba

Browse files
committed
Merge branch 'master' into StandardButton__or__
2 parents 9c0300a + e9a2f2d commit 0c37eba

16 files changed

+332
-194
lines changed

.github/workflows/ci.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- v*
9+
pull_request:
10+
branches:
11+
- "*"
12+
schedule:
13+
# Daily at 06:14. This is just an arbitrary time to stagger
14+
# relative to other daily builds in any given organization.
15+
- cron: '14 6 * * *'
16+
17+
jobs:
18+
test:
19+
name: ${{ matrix.os.name }} ${{ matrix.python.name }}
20+
runs-on: ${{ matrix.os.runs-on }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
os:
25+
- name: Linux
26+
runs-on: ubuntu-latest
27+
matrix: linux
28+
# https://github.com/stlehmann/PyQt5-stubs/issues/122
29+
# - name: Windows
30+
# runs-on: windows-latest
31+
# matrix: windows
32+
# https://github.com/stlehmann/PyQt5-stubs/issues/122
33+
# - name: macOS
34+
# runs-on: macos-latest
35+
# matrix: macos
36+
python:
37+
- name: CPython 3.5
38+
tox: py35
39+
action: 3.5
40+
- name: CPython 3.6
41+
tox: py36
42+
action: 3.6
43+
- name: CPython 3.7
44+
tox: py37
45+
action: 3.7
46+
- name: CPython 3.8
47+
tox: py38
48+
action: 3.8
49+
- name: CPython 3.9
50+
tox: py39
51+
action: 3.9
52+
steps:
53+
- uses: actions/checkout@v2
54+
- name: Set up ${{ matrix.python.name }}
55+
uses: actions/setup-python@v2
56+
with:
57+
python-version: '${{ matrix.python.action }}.0-alpha - ${{ matrix.python.action }}.X'
58+
architecture: x64
59+
- uses: twisted/python-info-action@v1.0.1
60+
- name: Install Linux Qt5 dependencies
61+
if: matrix.os.matrix == 'linux'
62+
run: |
63+
sudo apt-get update --yes
64+
sudo apt-get install --yes libgl1
65+
# Required to stubtest QtMultimedia
66+
sudo apt-get install --yes libpulse-mainloop-glib0
67+
- name: Install
68+
run: |
69+
pip install --upgrade pip setuptools wheel
70+
pip install tox
71+
- name: Test
72+
run: |
73+
tox -v -e ${{ matrix.python.tox }}
74+
75+
all:
76+
name: All
77+
runs-on: ubuntu-latest
78+
needs:
79+
- test
80+
steps:
81+
- name: This
82+
shell: python
83+
run: |
84+
import this

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

PyQt5-stubs/Qt3DRender.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int],
4242

4343
class QAbstractFunctor(sip.simplewrapper):
4444

45-
def __init__(self) -> None: ...
46-
4745
def id(self) -> sip.voidptr: ...
4846

4947
class QAbstractLight(Qt3DCore.QComponent):

PyQt5-stubs/QtBluetooth.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ class QBluetoothDeviceDiscoveryAgent(QtCore.QObject):
157157

158158
class QBluetoothDeviceInfo(sip.wrapper):
159159

160-
class Field(int): ...
161-
None_ = ... # type: 'QBluetoothDeviceInfo.Field'
162-
RSSI = ... # type: 'QBluetoothDeviceInfo.Field'
163-
ManufacturerData = ... # type: 'QBluetoothDeviceInfo.Field'
164-
All = ... # type: 'QBluetoothDeviceInfo.Field'
160+
class Field(int):
161+
None_ = ... # type: 'QBluetoothDeviceInfo.Field'
162+
RSSI = ... # type: 'QBluetoothDeviceInfo.Field'
163+
ManufacturerData = ... # type: 'QBluetoothDeviceInfo.Field'
164+
All = ... # type: 'QBluetoothDeviceInfo.Field'
165165

166166
class CoreConfiguration(int): ...
167167
UnknownCoreConfiguration = ... # type: 'QBluetoothDeviceInfo.CoreConfiguration'

PyQt5-stubs/QtCore.pyi

Lines changed: 66 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import typing
2424
from PyQt5 import sip
2525
from PyQt5 import QtCore
26+
from PyQt5 import QtWidgets
2627
import enum # import was missing
2728

2829
# Support for QDate, QDateTime and QTime.
@@ -42,6 +43,9 @@ class pyqtBoundSignal:
4243

4344

4445
class pyqtSignal:
46+
47+
signatures = ... # type: typing.Tuple[str, ...]
48+
4549
def __init__(self, *types: typing.Any, name: str = ...) -> None: ...
4650

4751
@typing.overload
@@ -66,47 +70,47 @@ QtSystemMsg = ... # type: QtMsgType
6670
QtInfoMsg = ... # type: QtMsgType
6771

6872

69-
class QCborKnownTags(int): ...
70-
DateTimeString = ... # type: QCborKnownTags
71-
UnixTime_t = ... # type: QCborKnownTags
72-
PositiveBignum = ... # type: QCborKnownTags
73-
NegativeBignum = ... # type: QCborKnownTags
74-
Decimal = ... # type: QCborKnownTags
75-
Bigfloat = ... # type: QCborKnownTags
76-
COSE_Encrypt0 = ... # type: QCborKnownTags
77-
COSE_Mac0 = ... # type: QCborKnownTags
78-
COSE_Sign1 = ... # type: QCborKnownTags
79-
ExpectedBase64url = ... # type: QCborKnownTags
80-
ExpectedBase64 = ... # type: QCborKnownTags
81-
ExpectedBase16 = ... # type: QCborKnownTags
82-
EncodedCbor = ... # type: QCborKnownTags
83-
Url = ... # type: QCborKnownTags
84-
Base64url = ... # type: QCborKnownTags
85-
Base64 = ... # type: QCborKnownTags
86-
RegularExpression = ... # type: QCborKnownTags
87-
MimeMessage = ... # type: QCborKnownTags
88-
Uuid = ... # type: QCborKnownTags
89-
COSE_Encrypt = ... # type: QCborKnownTags
90-
COSE_Mac = ... # type: QCborKnownTags
91-
COSE_Sign = ... # type: QCborKnownTags
92-
Signature = ... # type: QCborKnownTags
93-
94-
95-
class QCborSimpleType(int): ...
96-
False_ = ... # type: QCborSimpleType
97-
True_ = ... # type: QCborSimpleType
98-
Null = ... # type: QCborSimpleType
99-
Undefined = ... # type: QCborSimpleType
73+
class QCborKnownTags(int):
74+
DateTimeString = ... # type: QCborKnownTags
75+
UnixTime_t = ... # type: QCborKnownTags
76+
PositiveBignum = ... # type: QCborKnownTags
77+
NegativeBignum = ... # type: QCborKnownTags
78+
Decimal = ... # type: QCborKnownTags
79+
Bigfloat = ... # type: QCborKnownTags
80+
COSE_Encrypt0 = ... # type: QCborKnownTags
81+
COSE_Mac0 = ... # type: QCborKnownTags
82+
COSE_Sign1 = ... # type: QCborKnownTags
83+
ExpectedBase64url = ... # type: QCborKnownTags
84+
ExpectedBase64 = ... # type: QCborKnownTags
85+
ExpectedBase16 = ... # type: QCborKnownTags
86+
EncodedCbor = ... # type: QCborKnownTags
87+
Url = ... # type: QCborKnownTags
88+
Base64url = ... # type: QCborKnownTags
89+
Base64 = ... # type: QCborKnownTags
90+
RegularExpression = ... # type: QCborKnownTags
91+
MimeMessage = ... # type: QCborKnownTags
92+
Uuid = ... # type: QCborKnownTags
93+
COSE_Encrypt = ... # type: QCborKnownTags
94+
COSE_Mac = ... # type: QCborKnownTags
95+
COSE_Sign = ... # type: QCborKnownTags
96+
Signature = ... # type: QCborKnownTags
97+
98+
99+
class QCborSimpleType(int):
100+
False_ = ... # type: QCborSimpleType
101+
True_ = ... # type: QCborSimpleType
102+
Null = ... # type: QCborSimpleType
103+
Undefined = ... # type: QCborSimpleType
100104

101105

102106
class Qt(sip.simplewrapper):
103107

104-
class HighDpiScaleFactorRoundingPolicy(int): ...
105-
Round = ... # type: 'Qt.HighDpiScaleFactorRoundingPolicy'
106-
Ceil = ... # type: 'Qt.HighDpiScaleFactorRoundingPolicy'
107-
Floor = ... # type: 'Qt.HighDpiScaleFactorRoundingPolicy'
108-
RoundPreferFloor = ... # type: 'Qt.HighDpiScaleFactorRoundingPolicy'
109-
PassThrough = ... # type: 'Qt.HighDpiScaleFactorRoundingPolicy'
108+
class HighDpiScaleFactorRoundingPolicy(int):
109+
Round = ... # type: 'Qt.HighDpiScaleFactorRoundingPolicy'
110+
Ceil = ... # type: 'Qt.HighDpiScaleFactorRoundingPolicy'
111+
Floor = ... # type: 'Qt.HighDpiScaleFactorRoundingPolicy'
112+
RoundPreferFloor = ... # type: 'Qt.HighDpiScaleFactorRoundingPolicy'
113+
PassThrough = ... # type: 'Qt.HighDpiScaleFactorRoundingPolicy'
110114

111115
class ChecksumType(int): ...
112116
ChecksumIso3309 = ... # type: 'Qt.ChecksumType'
@@ -1761,6 +1765,9 @@ class Qt(sip.simplewrapper):
17611765
def __index__(self) -> int: ...
17621766
def __int__(self) -> int: ...
17631767

1768+
def convertFromPlainText(self, plain: str, mode: QtCore.Qt.WhiteSpaceMode = ...) -> str: ...
1769+
def mightBeRichText(self, a0: str) -> bool: ...
1770+
17641771

17651772
class QObject(sip.wrapper):
17661773

@@ -1964,11 +1971,11 @@ class QPersistentModelIndex(sip.simplewrapper):
19641971

19651972
class QAbstractItemModel(QObject):
19661973

1967-
class CheckIndexOption(int): ...
1968-
NoOption = ... # type: 'QAbstractItemModel.CheckIndexOption'
1969-
IndexIsValid = ... # type: 'QAbstractItemModel.CheckIndexOption'
1970-
DoNotUseParent = ... # type: 'QAbstractItemModel.CheckIndexOption'
1971-
ParentIsInvalid = ... # type: 'QAbstractItemModel.CheckIndexOption'
1974+
class CheckIndexOption(int):
1975+
NoOption = ... # type: 'QAbstractItemModel.CheckIndexOption'
1976+
IndexIsValid = ... # type: 'QAbstractItemModel.CheckIndexOption'
1977+
DoNotUseParent = ... # type: 'QAbstractItemModel.CheckIndexOption'
1978+
ParentIsInvalid = ... # type: 'QAbstractItemModel.CheckIndexOption'
19721979

19731980
class LayoutChangeHint(int): ...
19741981
NoLayoutChangeHint = ... # type: 'QAbstractItemModel.LayoutChangeHint'
@@ -2274,9 +2281,7 @@ class QIODevice(QObject):
22742281
ExistingOnly = ... # type: 'QIODevice.OpenModeFlag'
22752282

22762283
class OpenModeFlag(int):
2277-
def __and__(self, other: typing.Union['QIODevice.OpenModeFlag', 'QIODevice.OpenMode']) -> 'QIODevice.OpenModeFlag': ... #type: ignore[override]
22782284
def __or__(self, other: typing.Union['QIODevice.OpenModeFlag', 'QIODevice.OpenMode']) -> 'QIODevice.OpenModeFlag': ... #type: ignore[override]
2279-
def __xor__(self, other: typing.Union['QIODevice.OpenModeFlag', 'QIODevice.OpenMode']) -> 'QIODevice.OpenModeFlag': ... #type: ignore[override]
22802285

22812286
class OpenMode(sip.simplewrapper):
22822287

@@ -2385,11 +2390,11 @@ class QBuffer(QIODevice):
23852390

23862391
class QByteArray(sip.simplewrapper):
23872392

2388-
class Base64DecodingStatus(int): ...
2389-
Ok = ... # type: 'QByteArray.Base64DecodingStatus'
2390-
IllegalInputLength = ... # type: 'QByteArray.Base64DecodingStatus'
2391-
IllegalCharacter = ... # type: 'QByteArray.Base64DecodingStatus'
2392-
IllegalPadding = ... # type: 'QByteArray.Base64DecodingStatus'
2393+
class Base64DecodingStatus(int):
2394+
Ok = ... # type: 'QByteArray.Base64DecodingStatus'
2395+
IllegalInputLength = ... # type: 'QByteArray.Base64DecodingStatus'
2396+
IllegalCharacter = ... # type: 'QByteArray.Base64DecodingStatus'
2397+
IllegalPadding = ... # type: 'QByteArray.Base64DecodingStatus'
23932398

23942399
class Base64Option(int): ...
23952400
Base64Encoding = ... # type: 'QByteArray.Base64Option'
@@ -2575,12 +2580,12 @@ class QByteArrayMatcher(sip.simplewrapper):
25752580

25762581
class QCalendar(sip.simplewrapper):
25772582

2578-
class System(int): ...
2579-
Gregorian = ... # type: 'QCalendar.System'
2580-
Julian = ... # type: 'QCalendar.System'
2581-
Milankovic = ... # type: 'QCalendar.System'
2582-
Jalali = ... # type: 'QCalendar.System'
2583-
IslamicCivil = ... # type: 'QCalendar.System'
2583+
class System(int):
2584+
Gregorian = ... # type: 'QCalendar.System'
2585+
Julian = ... # type: 'QCalendar.System'
2586+
Milankovic = ... # type: 'QCalendar.System'
2587+
Jalali = ... # type: 'QCalendar.System'
2588+
IslamicCivil = ... # type: 'QCalendar.System'
25842589

25852590
Unspecified = ... # type: int
25862591

@@ -3552,9 +3557,9 @@ class QTime(sip.simplewrapper):
35523557

35533558
class QDateTime(sip.simplewrapper):
35543559

3555-
class YearRange(int): ...
3556-
First = ... # type: 'QDateTime.YearRange'
3557-
Last = ... # type: 'QDateTime.YearRange'
3560+
class YearRange(int):
3561+
First = ... # type: 'QDateTime.YearRange'
3562+
Last = ... # type: 'QDateTime.YearRange'
35583563

35593564
@typing.overload
35603565
def __init__(self) -> None: ...
@@ -7469,16 +7474,14 @@ class QSharedMemory(QObject):
74697474

74707475
class QSignalMapper(QObject):
74717476

7472-
from PyQt5.QtWidgets import QWidget
7473-
74747477
def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ...
74757478

74767479
@typing.overload
74777480
def map(self) -> None: ...
74787481
@typing.overload
74797482
def map(self, sender: QObject) -> None: ...
74807483
def mappedObject(self, a0: QObject) -> None: ...
7481-
def mappedWidget(self, a0: QWidget) -> None: ...
7484+
def mappedWidget(self, a0: QtWidgets.QWidget) -> None: ...
74827485
def mappedString(self, a0: str) -> None: ...
74837486
def mappedInt(self, a0: int) -> None: ...
74847487
mapped: typing.ClassVar[pyqtSignal]
@@ -7487,7 +7490,7 @@ class QSignalMapper(QObject):
74877490
@typing.overload
74887491
def mapping(self, text: str) -> QObject: ...
74897492
@typing.overload
7490-
def mapping(self, widget: QWidget) -> QObject: ...
7493+
def mapping(self, widget: QtWidgets.QWidget) -> QObject: ...
74917494
@typing.overload
74927495
def mapping(self, object: QObject) -> QObject: ...
74937496
def removeMappings(self, sender: QObject) -> None: ...
@@ -7496,7 +7499,7 @@ class QSignalMapper(QObject):
74967499
@typing.overload
74977500
def setMapping(self, sender: QObject, text: str) -> None: ...
74987501
@typing.overload
7499-
def setMapping(self, sender: QObject, widget: QWidget) -> None: ...
7502+
def setMapping(self, sender: QObject, widget: QtWidgets.QWidget) -> None: ...
75007503
@typing.overload
75017504
def setMapping(self, sender: QObject, object: QObject) -> None: ...
75027505

@@ -8053,8 +8056,6 @@ class QTextCodec(sip.wrapper):
80538056

80548057
def __init__(self, flags: typing.Union['QTextCodec.ConversionFlags', 'QTextCodec.ConversionFlag'] = ...) -> None: ...
80558058

8056-
def __init__(self) -> None: ...
8057-
80588059
def convertFromUnicode(self, in_: str, state: 'QTextCodec.ConverterState') -> QByteArray: ...
80598060
def convertToUnicode(self, in_: bytes, state: 'QTextCodec.ConverterState') -> str: ...
80608061
def mibEnum(self) -> int: ...

0 commit comments

Comments
 (0)