pyrefly icon indicating copy to clipboard operation
pyrefly copied to clipboard

Find-references for library code

Open kinto0 opened this issue 3 months ago • 4 comments

Describe the Bug

We can find references in our own code. but what about references in our own code of site-package methods?

example: I want to find all references to np.darray in my code

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

No response

kinto0 avatar Oct 27 '25 23:10 kinto0

I'm not really sure what this issue is describing. Can you elaborate a bit?

[Context]

samwgoldman avatar Oct 27 '25 23:10 samwgoldman

following problem fixed on 0.43.1


Have just started to use pyrefly in nvim lately. find-reference and find-definition works perfectly when class/function is defined within the same py file.

I encounter problem if I have a python pkg test (discoverable in my pythonpath) with init.py (empty) func_1.py main.py

in func_1.py

def hello(): return "Hello"

in main.py

import test.func_1 as f1
a = f1.hello()

from main.py, I can't use find-definition to jump to func_1.py; in func_1.py I can't see anything when find-reference. If switch to pylsp or basedpyright, the find-definition and find-reference work fine.

echaya avatar Nov 22 '25 12:11 echaya

Have just started to use pyrefly in nvim lately. find-reference and find-definition works perfectly when class/function is defined within the same py file.

I encounter problem if I have a python pkg test (discoverable in my pythonpath) with init.py (empty) func_1.py main.py

in func_1.py

def hello(): return "Hello" in main.py

import test.func_1 as f1 a = f1.hello() from main.py, I can't use find-definition to jump to func_1.py; in func_1.py I can't see anything when find-reference. If switch to pylsp or basedpyright, the find-definition and find-reference work fine.

hi, could you open a new github issue for this?

kinto0 avatar Nov 24 '25 16:11 kinto0

Have just started to use pyrefly in nvim lately. find-reference and find-definition works perfectly when class/function is defined within the same py file. I encounter problem if I have a python pkg test (discoverable in my pythonpath) with init.py (empty) func_1.py main.py in func_1.py def hello(): return "Hello" in main.py import test.func_1 as f1 a = f1.hello() from main.py, I can't use find-definition to jump to func_1.py; in func_1.py I can't see anything when find-reference. If switch to pylsp or basedpyright, the find-definition and find-reference work fine.

hi, could you open a new github issue for this?

Just upgraded to 0.43.1 seems the problem is gone 🎆

echaya avatar Nov 24 '25 22:11 echaya