Pyright incorrectly resolving internal paths on files #8541
Labels
bug
[core label]
language server
An umbrella label for all language servers
language
An umbrella label for all programming languages syntax behaviors
python
Python programming language support
stale
Label used by `stale` action
Check for existing issues
Describe the bug / provide steps to reproduce it
I'm currently using Zed to write a python package. However, I'm having some issues with getting PyRight to understand the internal structure of the package.
My package possesses the following file structure:
When running my web server, the following import statements are used (for example)
This correctly works internally when running or using anything from the package. However, pyright throws an issue:
import anchor_sdk could not be resolved (reportMissingImports)
in the IDE. If I change the above snippet to:The issue is then resolved in Pyright, however when running anything from the library causes the runtime error:
How can I make it so pyright is able to either understand that anchor_sdk is a valid way to access the files, or make my python package able to read those references as valid file paths? I appreciate the help!
Environment
Zed: v0.123.6 (Zed)
OS: macOS 13.0.0
Memory: 16 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.If you only need the most recent lines, you can run the
zed: open log
command palette action to see the last 1000.No response
The text was updated successfully, but these errors were encountered: