python-qt-tools / PyQt5-stubs

Stubs for PyQt5
GNU General Public License v3.0
69 stars 31 forks source link

Include platform specific stubs #192

Closed bluebird75 closed 2 years ago

bluebird75 commented 2 years ago

Ready to be merged.

altendky commented 2 years ago

I would expect new files to be introduced to upstream. If you are using new automation then I would expect that to be used to create the upstream catch up branch. Also, I didn't look over most of this but did notice a change from import PyQt5.sip to from PyQt5 import sip which is tempting for consistency with other adjacent imports but introduces inconsistency with other files as well as upstream.

bluebird75 commented 2 years ago

Hi Kyle,

Thanks for the feedback. For the sip thing, the change I did is similar to other modules :

(env_pyqt5) d:\work\pyqt-stubs\PyQt5-stubs>rg "from PyQt5 import sip" --count
PyQt5-stubs\Qt3DAnimation.pyi:1
PyQt5-stubs\Qt3DExtras.pyi:1
PyQt5-stubs\Qt3DInput.pyi:1
PyQt5-stubs\Qt3DCore.pyi:1
PyQt5-stubs\Qt3DLogic.pyi:1
PyQt5-stubs\QtChart.pyi:1
PyQt5-stubs\QtBluetooth.pyi:1
PyQt5-stubs\Qt3DRender.pyi:1
PyQt5-stubs\QtDataVisualization.pyi:1
PyQt5-stubs\QtDBus.pyi:1
PyQt5-stubs\QtCore.pyi:1
PyQt5-stubs\QtDesigner.pyi:1
PyQt5-stubs\QtHelp.pyi:1
PyQt5-stubs\QtGui.pyi:1
PyQt5-stubs\QtLocation.pyi:1
PyQt5-stubs\QtMultimediaWidgets.pyi:1
PyQt5-stubs\QtMultimedia.pyi:1
PyQt5-stubs\QtNetwork.pyi:1
PyQt5-stubs\QtNetworkAuth.pyi:1
PyQt5-stubs\QtNfc.pyi:1
PyQt5-stubs\QtOpenGL.pyi:1
PyQt5-stubs\QtPositioning.pyi:1
PyQt5-stubs\QtPrintSupport.pyi:1
PyQt5-stubs\QtPurchasing.pyi:1
PyQt5-stubs\QtQml.pyi:1
PyQt5-stubs\QtQuick.pyi:1
PyQt5-stubs\QtQuickWidgets.pyi:1
PyQt5-stubs\QtRemoteObjects.pyi:1
PyQt5-stubs\QtSensors.pyi:1
PyQt5-stubs\QtSerialPort.pyi:1
PyQt5-stubs\QtSql.pyi:1
PyQt5-stubs\QtSvg.pyi:1
PyQt5-stubs\QtTest.pyi:1
PyQt5-stubs\QtWebChannel.pyi:1
PyQt5-stubs\QtWebEngine.pyi:1
PyQt5-stubs\QtWebEngineCore.pyi:1
PyQt5-stubs\QtWebEngineWidgets.pyi:1
PyQt5-stubs\QtWebKit.pyi:1
PyQt5-stubs\QtWebKitWidgets.pyi:1
PyQt5-stubs\QtWebSockets.pyi:1
PyQt5-stubs\QtX11Extras.pyi:1
PyQt5-stubs\QtXml.pyi:1
PyQt5-stubs\QtWidgets.pyi:1
PyQt5-stubs\QtXmlPatterns.pyi:1

(env_pyqt5) d:\work\pyqt-stubs\PyQt5-stubs>rg "import PyQt5.sip" --count
(env_pyqt5) d:\work\pyqt-stubs\PyQt5-stubs>

Also, if you check commit 8084a1b360a3c069a55f124cb797284ce7334b1c for example, you can see that a guy named Kyle did some similar changes.

About the upstream, you have a good point. I'll create the files in the upstream and make my changes appear after the merge of the upstream for more clarity.

bluebird75 commented 2 years ago

Update to the upstream branch is available in #196

I did not use any automation tool, I manually downloaded all wheels and extracted the .pyi files . Creating automation is longer than just doing this.

bluebird75 commented 2 years ago

Review was already done months ago. Just syncing with master and merging.