How do I get relative auto-imports #2379
-
As I'm developing a package, I always want to use relative imports within that package. For instance, if I have the following modules: foo/common.py class Base:
... foo/one.py from .common import Base
class One(Base):
... When I get suggestions from pyright via the LSP while developing these modules, it always gives the the suggestions as absolute imports. As an example, let's say I was going to develop class Two(Base At this point, the LSP will give me an auto-import of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We're tracking this on microsoft/pylance-release#607; we currently don't have any support for auto-imports that are relative. I'd vote/discuss there if you're interested in that. |
Beta Was this translation helpful? Give feedback.
We're tracking this on microsoft/pylance-release#607; we currently don't have any support for auto-imports that are relative. I'd vote/discuss there if you're interested in that.