pythonstubs
pythonstubs copied to clipboard
PyStubbler is skipping namespaces and overwriting __init__.pyi
I am using the pystubbler to build the stubs for the Dynamo/Revit assembly ForgeUnitsCLI.dll
(Typically located in C:\Program Files\Autodesk\Revit <year>\AddIns\DynamoForRevit
directory for Revit versions >= 2023 and also present in the DynamoSandbox root directory)
The assembly has three namespaces
I am able to generate the stubs by changing line 140 in StubBuilder.cs to i=0
this also avoids overwriting the __init__.pyi file in the root assembly folder
https://github.com/mcneel/pythonstubs/blob/98299771c9ff68157d657596020ed0019f2f3d94/builder/PyStubblerLib/StubBuilder.cs#L140
However I am finding that Pylance is now unable to resolve the Assembly unless I promote the namespace folders to my root autocomplete/stubs folder or adding the ForgeUnitsCLR
directory to the python.autoComplete.extraPaths
setting.
~I'm not across the Python type hinting syntax so any assistance would be appreciated~
Edit: Reading this -> https://typing.readthedocs.io/en/latest/
Is it possible the identical Assembly and namespace names are causing the bug?