Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
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

Description

@RomanKornev

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions