forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Description
Environment data
- VS Code version: 1.21.p
- Extension version (available under the Extensions sidebar): 2018.2.1
- OS and version: macOS 10.13.3
- Python version (& distribution if applicable, e.g. Anaconda): 3.6.4
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pipenv with proper python path in vscode
- Relevant/affected Python packages and their versions: flask_restplus
Actual behavior
Going to definition for Namespace from flask_restplus goes to __init__.py
instead of file namespace.py
.
Also vscode shows error "instance of Namespace has no member ..." etc, since vscode-python cannot learn that
from .namespace import ...
is
from namespace import ...
Expected behavior
No errors, going to definition is fine
Steps to reproduce:
- Install pipenv, config vscode to work with python version
- Install flask_restplus, import Namespace from library, try to go inside and go to definition of Namespace in init.py file
- See vscode-python does not recognize "from .namespace import" and does not lead anywhere
- Remove dot and repeat
- See everything is working fine now, but source has been modified, so it's not a solution
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
XXX
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
)
XXX
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug