RhinoPythonForVscode icon indicating copy to clipboard operation
RhinoPythonForVscode copied to clipboard

Error in CodeListener/0.1.7.0/AutoComplete/Rhino/init.py

Open yck011522 opened this issue 5 years ago • 4 comments

I had the problem where code completion is not working for Rhino.RhinoDoc. Upon investigation I noticed there is two flagged error in the init.py. Two function signatures have a line like this:

def TryGetEnumValue(self,*__args):
# Error generating skeleton for function TryGetEnumValue: Method must be called on a Type for which Type.IsGenericParameter is false.

def GetEnumValue(self,*__args):
# Error generating skeleton for function GetEnumValue: Method must be called on a Type for which Type.IsGenericParameter is false.

I use Pylance and it is flagging these two lines as error because there is nothing in the def signature after this error message. I added a pass to them and it seems to work fine. I suspect this fix is related to the problem in #4

yck011522 avatar Sep 28 '20 16:09 yck011522

Oh I just realize this issue might be better posted to https://github.com/ccc159/CodeListener Anyways. Feel free to close this and move it.

yck011522 avatar Sep 28 '20 17:09 yck011522

The auto-complete feature fully depends on the stubs, as python cannot parse CLR assemblies.

If Rhino.RhinoDoc is not here, then there's not so much you can do.

jingcheng-chen avatar Sep 29 '20 16:09 jingcheng-chen

@ccc159 I'm not sure what you mean. The stubs I refer to (that has the two lines of error) is the stubs that comes with CodeListener Installation.

yck011522 avatar Oct 05 '20 10:10 yck011522

Yes, those stubs in my plugin come from the link I mentioned above. I didn't bother to re-make it. Of course if you are interested, you could try to make a new one from current Rhino assemblies.

jingcheng-chen avatar Oct 06 '20 07:10 jingcheng-chen