Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Handle symbol imports correctly #20

Open
benjaminjkraft opened this issue Mar 6, 2018 · 2 comments
Open

Handle symbol imports correctly #20

benjaminjkraft opened this issue Mar 6, 2018 · 2 comments

Comments

@benjaminjkraft
Copy link
Contributor

Our handling of the case where you do from [package.]module import symbol ; symbol rather than [from package] import module ; module.symbol is pretty inadequate; for example we assume that import <fullname> is always a valid import, which is not true for symbols. KA prohibits this style but it's common in other code, so it would be nice to handle it.

@benjaminjkraft
Copy link
Contributor Author

Looks like we actually just change the import to be a module-import here, which is legal but not ideal. I'll close this and open something more specific.

@benjaminjkraft
Copy link
Contributor Author

Never mind! I remembered what we do wrong. If your file does from foo import some_function, and you say to move the entire file foo (say to bar), we don't even notice the reference. I'll add a skipped test for now.

benjaminjkraft added a commit that referenced this issue Mar 26, 2018
This is mostly just a placeholder/reproduction for #20; it's a case we
currently don't handle because it doesn't appear in KA code.

Test plan: `make check`

Auditors: csilvers
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant