Hi,

We've been trying to use VS Code Python type checkers to reduce errors, and
leverage Intellisense for code completion.  We've been unable to get these
to work with PyQGIS and PyQT classes, for instance:

[image: image.png]

I believe I've traced the problem to some customized importing that's used
in places like the following:
c:\OSGeo4W\apps\qgis-ltr\python\qgis\__init__.py
c:\OSGeo4W\apps\qgis-ltr\python\qgis\core\__init__.py
c:\OSGeo4W\apps\qgis-ltr\python\qgis\PyQt\Qt.py

I then found that apparently similar techniques have caused the same types
of problems when using libraries like TensorFlow:
https://stackoverflow.com/questions/65271399/vs-code-pylance-pylint-cannot-resolve-import
https://github.com/PyCQA/pylint/issues/2603#issuecomment-541622729

The convoluted ways suggested to deal with these problems aren't really
that appealing.  Does anyone have any suggestions for cleaner ways to
handle this?

Are there reasons why QGIS has to be implemented like this?  It's not clear
from the "monkey patching" comments whether these were temporary
workarounds or not.

Thanks,
Ari
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to