Improve function diff docstring, begin function clean

This commit is contained in:
kxrd 2017-06-13 01:10:47 +02:00
parent 7549b1c416
commit ac6ce860d0

View File

@ -291,12 +291,16 @@ def compare_modules(file_, imports):
def diff(file_, imports): def diff(file_, imports):
"""Display the difference between modules in file a and imported modules.""" """Display the difference between modules in a file and imported modules."""
modules_not_imported = compare_modules(file_, imports) modules_not_imported = compare_modules(file_, imports)
logging.info("The following modules are in {} but do not seem to be imported: " logging.info("The following modules are in {} but do not seem to be imported: "
"{}".format(file_, ", ".join(x for x in modules_not_imported))) "{}".format(file_, ", ".join(x for x in modules_not_imported)))
def clean(file_, imports):
"""Remove modules that aren't imported in project from file."""
def init(args): def init(args):
encoding = args.get('--encoding') encoding = args.get('--encoding')