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