use walrus =)

This commit is contained in:
onyx-and-iris 2022-10-28 02:18:39 +01:00
parent a4cc7058b6
commit bc508f8982

View File

@ -64,8 +64,7 @@ def interactive_mode(parser):
while cmd := input("Please enter command (Press <Enter> to exit)\n"):
if not cmd:
break
res = parser.parse((cmd,))
if res:
if res := parser.parse((cmd,)):
print(res)
@ -91,8 +90,7 @@ def main():
interactive_mode(parser)
return
res = parser.parse(cmds)
if res:
if res := parser.parse(cmds):
print(res)