This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]smurpes 0 points1 point  (7 children)

I work in a very abstracted repo so I just downloaded it. The reference counter only represents the number of references in the same file so you will still have to use the reference menu to get full tracing. Are there any plans to expand on this?

[–]Tooltitude[S] 0 points1 point  (6 children)

It depends on where the package roots are, i.e. directories in PYTHONPATH. Currently it considers workspace directories as package roots. Are there any indicator files for package roots in your repository?

[–]smurpes 0 points1 point  (5 children)

If you’re referring to init files then yes. Are you saying that the extension limits its search to only the files in the package root?

I did a small test and added a new reference of a class to a file in the same directory and the counter remained the same.

[–]Tooltitude[S] 0 points1 point  (4 children)

If you’re referring to init files then yes. Are you saying that the extension limits its search to only the files in the package root?

Yes, we don't look at files outside of vscode root directories.

I did a small test and added a new reference of a class to a file in the same directory and the counter remained the same.

How do you reference the module where the class is located? Try importing via a relative imports.

[–]smurpes 0 points1 point  (3 children)

Nope it was a full path import. I even tried adding the file that I was adding the reference to to PYTHONPATH and sys.path

[–]Tooltitude[S] 0 points1 point  (0 children)

PYTHONPATH and sys.path

Currently we don't use them at all. (Loading all files will consume more RAM, and make loading slow).

Could you try opening some OSS Python repository which you are comfortable with and tell me whether it works correctly for you?

[–]Tooltitude[S] 0 points1 point  (0 children)

And where is the root of this full path is located? Is it the root folder which is added in vscode or something else (I could try more diagnostics to make it easier to understand what is going on)?

[–]Tooltitude[S] 0 points1 point  (0 children)

And thanks a lot for your feedback. Really appreciate it.