Intellisense not working when using a specific import / return combination
See original GitHub issueEnvironment data
- VS Code version: 1.27.2
- Extension version (available under the Extensions sidebar): 2018.9.0
- OS and version: Ubuntu 18.04.1 LTS
- Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.6
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): virtualenv
- Relevant/affected Python packages and their versions: /
Actual behavior
Inellisense not working when using a specific import / return combination.
Expected behavior
Intellisense to work.
Steps to reproduce:
File policy/ab.py
:
class BaseAB:
def smthng(self, i):
pass
class A(BaseAB):
def smthng(self, i):
print("A smthng " + str(i))
class B(BaseAB):
def smthng(self, i):
print("B smthng " + str(i))
File policy/__init__.py
:
from policy.ab import A, B
def build_test(input):
return {
'A': A,
'B': B
}[input]()
Intellisense does not know what build_test returns:
Interestingly, it works in other combinations, like the same input but when return is with ifs: Or the same return but when import is a bit different, when not importing to the class level:
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
vscode Intellisense of importing modules stopped working
I just updated Visual Studio Code, and suddenly when I import modules in Javascript: import module from './module'. Intellisense doesn't ...
Read more >Intellisense not working in sass/scss files for mixins when ...
In my scss file, for example: @import '~foundation-sites/scss/foundation'; @include foundation-everything($flex: true); I get a squiggly line in the editor ...
Read more >Python Intellisense not working with Visual Studio 2017 15.2
Hi I tried all possible options to enable Intellisense but not ... If I have a text editor with "import numpy as np"...
Read more >Intellisense not working for Visual Studio Code
Operating System: Windows 10 Problem: 1. Intellisense and Autocomplete not working for VScode. 2. Opening c# script within the editor opens ...
Read more >[UE 5.1] VisualStudio 2022 Intellisense for engine files not ...
After running UnrealBuildTool through the debugger, and messing around with it a little bit, found out that if you add the -Engine cmd...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
[ @bjg2 I edited your ✉️ ⬆️ to come off as more 😃 and less 😠 ]
We are just swamped with things, but we will triage this and figure out who to reach out to in order to get this potentially fixed.
Closing, language server & jedi have the same result for all combinations, and go to definition works.