From 5b86ea5ad04e43af3605f059bcffe5edda4e3252 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Sun, 22 May 2022 11:09:02 +1200 Subject: mypy: Install PyQt6 only and my fork My fork has Webengine stubs included too. All autogenerated with no specific codemods or anything yet. Ref https://github.com/python-qt-tools/PyQt6-stubs/issues/6 Switching to just PyQt6 instead of both 5 and 6 installed at the moment because ... it causes about half as many mypy errors. There are a lot of places like: if gettatt(...): # pyqt6 ... else: # pyqt5 ... that mypy has no idea about. I'm not sure the best way to guide it at this point. Even once I figure that out I'm not sure that doing one run with both 5+6 is the way to go, we might want to split mypy into two runs. --- misc/requirements/requirements-mypy.txt | 2 +- misc/requirements/requirements-mypy.txt-raw | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index e59e62199..47253c95b 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -11,7 +11,7 @@ mypy==0.961 mypy-extensions==0.4.3 pluggy==1.0.0 Pygments==2.12.0 -PyQt5-stubs==5.15.6.0 +PyQt6-stubs @ git+https://github.com/toofar/PyQt6-stubs.git@7e0929694eea67d5ce33908808669d8896ebaaa2 tomli==2.0.1 types-PyYAML==6.0.8 typing_extensions==4.2.0 diff --git a/misc/requirements/requirements-mypy.txt-raw b/misc/requirements/requirements-mypy.txt-raw index dd00d3219..94d5342ef 100644 --- a/misc/requirements/requirements-mypy.txt-raw +++ b/misc/requirements/requirements-mypy.txt-raw @@ -2,7 +2,9 @@ mypy lxml # For HTML reports diff-cover -PyQt5-stubs +#PyQt5-stubs +#git+https://github.com/python-qt-tools/PyQt6-stubs.git#main +git+https://github.com/toofar/PyQt6-stubs.git#main types-PyYAML # So stubs are available even on newer Python versions -- cgit v1.2.3-54-g00ecf