microsoft / python-language-server

Microsoft Language Server for Python
Apache License 2.0
910 stars 130 forks source link

Intellisense suggests imported names which should be considered an implementation detail. #2163

Closed parched closed 2 years ago

parched commented 2 years ago

PEP-8 mentions

Imported names should always be considered an implementation detail

When I have

# b.py
import c

x = 1

and I create

# a.py
import b
b. # intellisense shows c and x, but c should be considered an implementation detail

I don't actually mind that c is shown, because I expect some code doesn't consider imports an implementation detail, e.g. __init__.py, but I think it would be more useful if all the imported names were at the bottom of the list.

Perhaps the order could be something like this:

Even better would be if the names intellisense thinks might be private are greyed slightly (It could be a good way to solve https://github.com/microsoft/python-language-server/issues/619)

parched commented 2 years ago

Looks like this is the wrong repo, I'm using pylance.