<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Further, when I manually remove the nesting in the installed pyi files autocomplete works fine.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 11, 2021, at 12:59 PM, Michael Gentili <<a href="mailto:gentili@mcpnet.ca" class="">gentili@mcpnet.ca</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I am using Visual Studio Code with the Python (Pylance) extension to provide autocomplete services.  <div class=""><br class=""></div><div class="">My environment is configured like so:</div><div class=""><br class=""></div><div class="">Python 3.9.1</div><div class="">PyQt6==6.0.3<br class="">PyQt6-3D==6.0.3<br class="">PyQt6-3D-Qt6==6.0.2<br class="">PyQt6-Qt6==6.0.2<br class="">PyQt6-sip==13.0.1</div><div class=""><br class=""></div><div class="">The following simple script runs fine and both pylance and pylint find no problems with it:<div class=""><br class=""></div><div class="">-------------------</div><div class="">from PyQt6.Qt3DExtras import Qt3DWindow<br class="">from PyQt6.QtWidgets import QApplication<br class=""><br class="">app = QApplication([])<br class=""><br class="">view = Qt3DWindow()<br class="">view.show()<br class=""><br class="">app.exec()<br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; border-spacing: 0px;"><div style="-webkit-text-decorations-in-effect: none;" class="">-------------------</div><div style="-webkit-text-decorations-in-effect: none;" class=""><br class=""></div><div style="-webkit-text-decorations-in-effect: none;" class="">However autocomplete is not picking up correct type information for everything under the PyQt6-3D module.  In the above example, the QApplication object will produce autocomplete suggestions, but the Qt3DWindow object will not.</div><div style="-webkit-text-decorations-in-effect: none;" class=""><br class=""></div><div style="-webkit-text-decorations-in-effect: none;" class="">I believe it has something to do with the structure of the pyi files for the PyQt modules.  The pyi files for the regular PyQt6 modules have their class definitions at the top level, while the pyi files for the PyQt6-3D modules have nested definitions:</div><div style="-webkit-text-decorations-in-effect: none;" class=""><br class=""></div><div style="-webkit-text-decorations-in-effect: none;" class=""># QtWidgets.pyi</div><div class=""><font class=""><span style="caret-color: rgb(0, 0, 0);" class="">class QApplication(QtGui.QGuiApplication):</span></font></div><div style="-webkit-text-decorations-in-effect: none;" class=""><br class=""></div><div style="-webkit-text-decorations-in-effect: none;" class=""># Qt3DExtras.pyi</div><div class=""><font class=""><span style="caret-color: rgb(0, 0, 0);" class="">class Qt3DExtras(PyQt6.sip.simplewrapper):<br class=""><br class="">    class QAbstractCameraController(Qt3DCore.QEntity):</span></font></div><div style="-webkit-text-decorations-in-effect: none;" class=""><br class=""></div><div style="-webkit-text-decorations-in-effect: none;" class="">So I can still write working code, but the lack of autocomplete makes the process very painful.</div><div style="-webkit-text-decorations-in-effect: none;" class=""><br class=""></div><div style="-webkit-text-decorations-in-effect: none;" class="">Anyone have any experience or understanding of what’s going on here?</div><div style="-webkit-text-decorations-in-effect: none;" class=""><br class="Apple-interchange-newline">Michael Gentili</div><div style="-webkit-text-decorations-in-effect: none;" class="">MCP INC</div></span>

</div>
<br class=""></div></div></div></div></blockquote></div><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div class=""><br class="Apple-interchange-newline">Michael Gentili</div><div class="">MCP INC</div></span>

</div>
<br class=""></body></html>