Replies: 1 comment
-
|
I believe you answered your own question. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If we have a class
MyClaz, defined inside a path saysrc/test_pylance/testpkg/_claz.py, and I name the_claz.pyis a "private" member oftestpkgbecause I don't want to export this file. Instead I want to pylance being able to treat theMyClazis defined undertest_pylance.testpkgwhich I import it under__init__.pySay I have another file under
src/test_pylance/main.py, when I typeMyClazI hope it suggests me the one fromtest_pylance.testpkginstead of the one fromtest_pylance.testpkg._claz. Is there someway to accomplish the goal?Behaviour I get

I checked the previous issues and from the post Autoimport from module, not directly from file and another issue we are suggesting using option
includeAliasFromUserFilesbut it can be rather messy if we include everythingBehaviour I get after turn option on

And considering pylance is using option "includeAliasFromUserFiles" to exclude some elements that is considered 'alias' does that mean it is possible to control to only output one alias that is kind of "most appropriate", like the one with shortest path or is the root of the pathes?
The file structure i have is like follows, which is generated by

uv init --packageAnd the file I have is:
other python files are empty
I have also included a base64 encoding of the folder I am working on and it can be detared under a folder to repro my working environment using command
read base64_input; echo "$base64_input" | base64 -d | tar xzf -Thanks very much
Beta Was this translation helpful? Give feedback.
All reactions