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
After moving one or more funcdefs out of the file, I may want to then import them back in, and it'd be nice if this could be handled automatically (and since I'm already rewriting import statements it wouldn't be a big stretch)
hello.py
deffoo():
print("foo")
foo()
world.py
defbar():
print("bar")
mvdef -m foo hello.py world.py
python hello.py should continue to print out "foo",
hello.py should become:
from .worldimportfoo
I'm not sure how you'd want to detect whether to use relative import (.world) or absolute package imports, but at least defaulting to relative would be simple and easily corrected...
The text was updated successfully, but these errors were encountered:
After moving one or more funcdefs out of the file, I may want to then import them back in, and it'd be nice if this could be handled automatically (and since I'm already rewriting import statements it wouldn't be a big stretch)
hello.py
world.py
mvdef -m foo hello.py world.py
python hello.py
should continue to print out "foo",hello.py
should become:I'm not sure how you'd want to detect whether to use relative import (
.world
) or absolute package imports, but at least defaulting to relative would be simple and easily corrected...The text was updated successfully, but these errors were encountered: