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

Wrong file referenced in Find/List All References and Rename Symbol #454

Closed
RomanKornev opened this issue Dec 4, 2018 · 1 comment
Closed
Assignees
Milestone

Comments

@RomanKornev
Copy link

Environment data

  • VS Code version: 1.29.1
  • Language server version: 0.1.65.0
  • OS and version: Win 10 x64
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda 3.7.1 x64
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • "python.jediEnabled": false

Steps to reproduce:

  • Create 2 files:
# foo.py

from bar import baz


class spam:
    __bug__ = 0


def eggs(ham: spam):
    return baz(ham.__bug__)
# bar.py

# comments ########################################
# more commments ##################################
# even more comments ##############################


def baz(quux):
    pass
  • Hover over __bug__ and Find All References
  • Completely unrelated file bar.py is referenced at offset 112 which is exactly the offset of __bug__ in foo.py at line 11
    reference_bug
  • List All References behavior is identical
  • Trying to rename F2 __bug__ to some_random_variable works fine for foo.py but changes bar.py:
# bar.py

# comments ########################################
# more commments ##############################some_random_variable even more comments ##############################


def baz(quux):
    pass
@MikhailArkhipov
Copy link

Related #433

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants