You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am just starting into this but figured I'd get a ticket in sooner than later. Hopefully supporting type hints requires pretty minimal effort in qtpy since it is just (primarily?) a pass through library. I have had at least preliminary success by adding a py.typed file and then using mypy's --always-true and --always-false to set PYSIDE2 and PYQT5 variables as they need to be for the library I am interested in. I imagine giving qtpy a cli such that you could call env/bin/mypy --target yourlib $(env/bin/qtpy mypyargs) and the qtpy cli would generate the proper mypy arguments based on the regular library selection code. For the sake of allowing mypy runs to really be static I would expect to also document everything to set and allow generation of args via the cli based on a forced library like env/bin/qtpy mypyargs --use pyside2 or such.
Opinions? What sort of target would I have to hit to have a PR for this ready for the next release?
The text was updated successfully, but these errors were encountered:
I am just starting into this but figured I'd get a ticket in sooner than later. Hopefully supporting type hints requires pretty minimal effort in qtpy since it is just (primarily?) a pass through library. I have had at least preliminary success by adding a
py.typed
file and then using mypy's--always-true
and--always-false
to setPYSIDE2
andPYQT5
variables as they need to be for the library I am interested in. I imagine giving qtpy a cli such that you could callenv/bin/mypy --target yourlib $(env/bin/qtpy mypyargs)
and the qtpy cli would generate the proper mypy arguments based on the regular library selection code. For the sake of allowing mypy runs to really be static I would expect to also document everything to set and allow generation of args via the cli based on a forced library likeenv/bin/qtpy mypyargs --use pyside2
or such.Opinions? What sort of target would I have to hit to have a PR for this ready for the next release?
The text was updated successfully, but these errors were encountered: