mcneel/pythonstubs

Bracket of the autocomplete is not summarized on VSCode

Closed this issue · 2 comments

I import Rhino with python.

However, some of the autocompletions are not summarized.
For example, Rhino.Collections and Rhino.Geomatory are not represented.

The same is true for Grasshopper.

How can I solve this problem?
this is My setting.json

Setting>>Python › Auto Complete: Extra Paths setting.json

"python.autoComplete.extraPaths": [
        "/Users/user_name/.pyenv/versions/2.7.18/lib/python2.7/site-packages"
		],
"python.autoComplete.addBrackets": true
  • mac OS BigSur 11.6
  • Rhinoceros Ver7.7
    • Grasshopper Ver1.0.0007
  • VS Code Ver1.57.1
  • python 2.7.18(local )
    • env_name: ghremote
      summary autocomplete
sbaer commented

Rhino.Geometry is a namespace in RhinoCommon. This is similar to a module inside of a package in python. You would need to
import Rhino.Geometry as rg
in order to get completions

Thanks
Indeed,
from Rhino import Geometry as rg

will Importing
The same is true for the other modules.

But I can't call it after Rhino.•••• like in README.md.

Is that correct?

Add setting

I read #7 (comment)

I changed settig.json

  • python.analysis.extraPaths
    • Add paths to stub folders as additional modules
"python.analysis.extraPaths": [

"/Users/user_name/.pyenv/versions/2.7.18/lib/python2.7/site-packages"

],
  • changed folder name
    Rhino-stub ---> Rhino