smell: move commands arg to nonlocal var

This commit is contained in:
Romain Dorgueil
2018-08-11 07:16:12 +02:00
parent b9a2c4ce9e
commit adcb210c64

View File

@ -26,7 +26,9 @@ def entrypoint(args=None):
commands = {}
def register_extension(ext, commands=commands):
def register_extension(ext):
nonlocal commands
try:
parser = subparsers.add_parser(ext.name)
if isinstance(ext.plugin, type) and issubclass(ext.plugin, BaseCommand):