rope
rope copied to clipboard
Package to Module Conversion
I have multiple packages with containing very small modules (e.g. 10 lines of code). I would like to turn a package into a module:
foo/
__init__.py
bar.py
barbar.py
becomes: foo.py containing all code of foo/{__init__.py,bar.py, barbar.py} without relatives import. All other imports of a project needs to be rewritten, from foo.bar import X becomes from foo import X.
I see there is a topackage, so it would be kind of the inverse, I guess?