Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

Settings Go to definition shows module itself as definition #247

Closed
DonJayamanne opened this issue Oct 12, 2018 · 1 comment
Closed

Settings Go to definition shows module itself as definition #247

DonJayamanne opened this issue Oct 12, 2018 · 1 comment
Assignees
Labels
bug Something isn't working feature: references
Milestone

Comments

@DonJayamanne
Copy link

DonJayamanne commented Oct 12, 2018

Originally reported by @karthiknadig on microsoft/vscode-python#2867

Environment data

  • VS Code version: 1.28.0
  • Extension version (available under the Extensions sidebar): 2018.9.0
  • OS and version: windows
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: ptvsd==4.1.3

Actual behavior

Go to definition shows multiple definitions, even though there is only one. See image below.
image

Expected behavior

Should show single definition.

Steps to reproduce:

  1. Clone ptvsd master
  2. Create a python file in pytests folder.
  3. Add following code:
import pytest
from ptvsd.socket import create_server

class MyTest(object):
    def test_something(self):
        sock = create_server(('localhost', 5678))
        assert sock is not None
  1. right click on create_server and hit 'Go To definition'
@MikhailArkhipov
Copy link

No longer reproes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working feature: references
Projects
None yet
Development

No branches or pull requests

3 participants