You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Relative imports fail outside the import root once a config exists (leading dot is dropped) #5594
I can't provide a sandbox for this, as it relies on multiple files, but here's how to reproduce it:
pyproject.toml
src/mypkg/__init__.py
tests/__init__.py
tests/test_b.py : from .sub.helpers import X
tests/sub/__init__.py
tests/sub/helpers.py : X = 1
tests/sub/test_a.py : from .helpers import X
Hey @MarcoGorelli, thanks for reporting this. We actually do support multiple files in the sandbox now, so I tried to recreate it there. How does this look?
Activity
connernilsen commentedon Nov 13, 2026
Hey @MarcoGorelli, thanks for reporting this. We actually do support multiple files in the sandbox now, so I tried to recreate it there. How does this look?
https://pyrefly.org/sandbox/?project=v2.w1VkgqIwJTU5XyM5B5iLgOEKjkogbRUDzWDQ5AGUB4nAsANIk4KyQl4-JBRBYpBs55RYZaWgp6cHEsESdkX5oMSsmwlUXZoCLGZsFaJjlIqLkmOUdIDeBvmmOEYpFqgRKKafW1mQna6P1c_FuIRBZHwSUoWgV1yaBCvNMlJzCoDRBi3uUKsKtPIViasB1aZXoQm3BmgoLheApGA6wDIV4JAFetUQRQ3YpYnILqWeM9HTAjZbawE