From adcb210c6403308e49324f8a0f5227c00f212ac5 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Sat, 11 Aug 2018 07:16:12 +0200 Subject: [PATCH] smell: move commands arg to nonlocal var --- bonobo/commands/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bonobo/commands/__init__.py b/bonobo/commands/__init__.py index fb6de85..7017a5b 100644 --- a/bonobo/commands/__init__.py +++ b/bonobo/commands/__init__.py @@ -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):