Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The result of finding all references to the __init__ function is not correct #4954

Closed
linette-zyy opened this issue Oct 12, 2023 · 1 comment
Assignees
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@linette-zyy
Copy link

Environment data

Build of Visual Studio Code - Insiders: 1.84.0-insider
Build of python-insider: v2023.19.12841010
Build of pylance-insider: v2023.10.21

Code Snippet

test.py

class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age

file1.py

from test import Person
person1 = Person("John", 25)

file2.py

from test import Person
person2 = Person("Alice", 30)

Repro Steps

1.Open a new python file
2.Create a class in that python file with an init method.
3.Open two other python files
4.Import the first file in each
5.Create a variable by constructing the class in the two other files
6.Go back to the first file
7.Find all references on the init function
8.Verify it finds the same references as searching for the class name

Expected behavior

image

Actual behavior

image

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Oct 12, 2023
@heejaechang heejaechang added bug Something isn't working and removed needs repro Issue has not been reproduced yet labels Oct 14, 2023
@PylanceBot PylanceBot added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Oct 17, 2023
@heejaechang
Copy link
Contributor

This issue has been fixed in prerelease version 2023.10.31, which we've just released. You can find the changelog here: CHANGELOG.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

3 participants