pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

Go to def doesnt go to user-defined class

Open KacieKK opened this issue 7 months ago • 3 comments

Environment data

  • Language Server version: 6.103
  • OS and version: windows
  • Python version (& distribution if applicable, e.g. Anaconda): msft store 3.12, anaconda

Code Snippet

class ClassWithMagicMethod:
    def __len__(self) -> int:
        return 1

print(len(ClassWithMagicMethod()))

Repro Steps

Animation

1.on len , issue go to def

Expected behavior

go to line

    def __len__(self) -> int:

Actual behavior

It went to .pyi file

KacieKK avatar Jul 02 '24 00:07 KacieKK