Avoid potential shadowing issue
This commit is contained in:
parent
f9ad4d030d
commit
ca819b9b00
1 changed files with 2 additions and 2 deletions
|
|
@ -571,7 +571,7 @@ class CmdSet(object, metaclass=_CmdSetMeta):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if isinstance(cmd, str):
|
if isinstance(cmd, str):
|
||||||
cmd = next((cmd for cmd in self.commands if cmd.key == cmd), None)
|
cmd = next((_cmd for _cmd in self.commands if _cmd.key == cmd), None)
|
||||||
if cmd is None:
|
if cmd is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
@ -599,7 +599,7 @@ class CmdSet(object, metaclass=_CmdSetMeta):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if isinstance(cmd, str):
|
if isinstance(cmd, str):
|
||||||
cmd = next((cmd for cmd in self.commands if cmd.key == cmd), None)
|
cmd = next((_cmd for _cmd in self.commands if _cmd.key == cmd), None)
|
||||||
if cmd is None:
|
if cmd is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue