From bc7188eb4dfc6fafc082f6b8fc1d341f3b1f3e5d Mon Sep 17 00:00:00 2001 From: deeplow Date: Thu, 4 Aug 2022 12:27:16 +0100 Subject: [PATCH] add dev dependency: PySide2-stubs Mypy was returning many errors relating to PySide2, which didn't make much sense. This is apparently because there are missing type hinting stubs for PySide2. The temporary solution is to add this devel dependency. Upstream issue: (remove dep. when solved) - https://bugreports.qt.io/browse/PYSIDE-1675 --- poetry.lock | 21 ++++++++++++++++++++- pyproject.toml | 1 + 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index 0c1521ec9..e1a1372d0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -273,6 +273,21 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.10" [package.dependencies] shiboken2 = "5.15.2" +[[package]] +name = "pyside2-stubs" +version = "5.15.2.1.2" +description = "PEP561 stub files for the *PySide2/Qt5 for Python* framework" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +mypy = ">=0.940" +PySide2 = ">=5.11.0" + +[package.extras] +dev = ["pytest"] + [[package]] name = "pywin32" version = "304" @@ -352,7 +367,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- [metadata] lock-version = "1.1" python-versions = ">=3.7,<3.10" -content-hash = "6a2e8cab68d333430e4df165f7d3138f08e7e97c18d7a270d2596ed589c1ea60" +content-hash = "786373e6750c907d6353d3c96c2d8aebffb1b0271035a793469055e2d6502bac" [metadata.files] altgraph = [ @@ -560,6 +575,10 @@ pyside2 = [ {file = "PySide2-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-none-win32.whl", hash = "sha256:087a0b719bb967405ea85fd202757c761f1fc73d0e2397bc3a6a15376782ee75"}, {file = "PySide2-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl", hash = "sha256:1316aa22dd330df096daf7b0defe9c00297a66e0b4907f057aaa3e88c53d1aff"}, ] +pyside2-stubs = [ + {file = "PySide2-stubs-5.15.2.1.2.tar.gz", hash = "sha256:87b25aa47a4f99898e2282874e4f27411034780f6643461b1cf39b02b4937657"}, + {file = "PySide2_stubs-5.15.2.1.2-py3-none-any.whl", hash = "sha256:2bbe78bab9ab015f6d38cbcdca24dd7d4c5180236bcb62e3eddadcd1a390fea8"}, +] pywin32 = [ {file = "pywin32-304-cp310-cp310-win32.whl", hash = "sha256:3c7bacf5e24298c86314f03fa20e16558a4e4138fc34615d7de4070c23e65af3"}, {file = "pywin32-304-cp310-cp310-win_amd64.whl", hash = "sha256:4f32145913a2447736dad62495199a8e280a77a0ca662daa2332acf849f0be48"}, diff --git a/pyproject.toml b/pyproject.toml index 83006c927..d3320ab83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ setuptools = {version = "*", platform = "win32"} black = "*" isort = "*" mypy = "*" +PySide2-stubs = "*" [tool.poetry.scripts] dangerzone = 'dangerzone:main'