smell: move commands arg to nonlocal var
This commit is contained in:
@ -26,7 +26,9 @@ def entrypoint(args=None):
|
|||||||
|
|
||||||
commands = {}
|
commands = {}
|
||||||
|
|
||||||
def register_extension(ext, commands=commands):
|
def register_extension(ext):
|
||||||
|
nonlocal commands
|
||||||
|
|
||||||
try:
|
try:
|
||||||
parser = subparsers.add_parser(ext.name)
|
parser = subparsers.add_parser(ext.name)
|
||||||
if isinstance(ext.plugin, type) and issubclass(ext.plugin, BaseCommand):
|
if isinstance(ext.plugin, type) and issubclass(ext.plugin, BaseCommand):
|
||||||
|
|||||||
Reference in New Issue
Block a user