Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative imports not working #59

Open
jonathf opened this issue Dec 30, 2024 · 0 comments
Open

Relative imports not working #59

jonathf opened this issue Dec 30, 2024 · 0 comments

Comments

@jonathf
Copy link

jonathf commented Dec 30, 2024

I am testing out this plugin, and I am wondering if I am doing things correctly.

I made a tiny project:

pyproject.toml   # ... [tool.setuptools.packages.find]
myproj/
  __init__.py    # from .asdf import A
  asdf.py        # A = 4

I am using oil.nvim and trying to change the name of asdf.py to something else, no refactoring is triggered. If I instead use from myproj.asdf import A in __init__.py, it works as expected.

Should the plugin be able to deal with relative imports, or do the imports have to be absolute for it to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant