Skip to content

PyQt6 stubs example with QtCore #160

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

Closed
wants to merge 2 commits into from
Closed
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
12,433 changes: 0 additions & 12,433 deletions PyQt5-stubs/QtCore.pyi

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7,648 changes: 7,648 additions & 0 deletions PyQt6-stubs/QtCore.pyi

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion build_upstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from docker.utils.json_stream import json_stream

DEFAULT_DOCKERFILE = Path("Dockerfile")
DEFAULT_OUTPUT_DIR = Path("PyQt5-stubs")
DEFAULT_OUTPUT_DIR = Path("PyQt6-stubs")


def parse_args() -> argparse.Namespace:
Expand Down
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ def find_version(*file_paths):


setup(
name="PyQt5-stubs",
name="PyQt6-stubs",
url="https://github.com/python-qt-tools/PyQt5-stubs",
author="Stefan Lehmann",
maintainer="Kyle Altendorf, Bryce Beagle, Florian Bruhin",
maintainer_email="sda@fstab.net",
description="PEP561 stub files for the PyQt5 framework",
description="PEP561 stub files for the PyQt6 framework",
long_description=long_description,
long_description_content_type="text/markdown",
version=find_version('PyQt5-stubs', '__init__.pyi'),
version=find_version('PyQt6-stubs', '__init__.pyi'),
python_requires=">= 3.5",
package_data={"PyQt5-stubs": ['*.pyi']},
packages=["PyQt5-stubs"],
tests_require=["PyQt5==5.14.*"],
package_data={"PyQt6-stubs": ['*.pyi']},
packages=["PyQt6-stubs"],
tests_require=["PyQt6==6.1.*"],
extras_require={"build": ["docker==4.2.0"]},
classifiers=[
"Development Status :: 4 - Beta",
Expand Down
2 changes: 1 addition & 1 deletion tests/pyqtsignal.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import typing
from PyQt5 import QtCore
from PyQt6 import QtCore


class Class(QtCore.QObject):
Expand Down
2 changes: 1 addition & 1 deletion tests/pyqtslot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from PyQt5.QtCore import pyqtSlot
from PyQt6.QtCore import pyqtSlot

@pyqtSlot(str)
def func_none(s: str) -> None:
Expand Down
2 changes: 1 addition & 1 deletion tests/qmessagebox.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from PyQt5 import QtWidgets
from PyQt6 import QtWidgets

a = QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Ok # type: QtWidgets.QMessageBox.StandardButtons
b = QtWidgets.QMessageBox.Ok | 0 # type: int
Expand Down
4 changes: 2 additions & 2 deletions tests/qobject.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import typing

from PyQt5 import QtCore
from PyQt5 import QtWidgets
from PyQt6 import QtCore
from PyQt6 import QtWidgets


q = QtCore.QObject()
Expand Down
2 changes: 1 addition & 1 deletion tests/qtimer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
In the upstream PyQt stubs, signals are normal methods.
"""

from PyQt5.QtCore import QTimer
from PyQt6.QtCore import QTimer

timer = QTimer()
timer.timeout.connect(lambda: None)
2 changes: 1 addition & 1 deletion tests/qtreewidgetitem.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from PyQt5 import QtWidgets
from PyQt6 import QtWidgets

class MyTreeWidgetItem(QtWidgets.QTreeWidgetItem):

Expand Down
2 changes: 1 addition & 1 deletion tests/simple.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from PyQt5 import QtCore
from PyQt6 import QtCore