From 9f36c7c517409f98d6beeecb37adbfdce98615ab Mon Sep 17 00:00:00 2001 From: denarced Date: Sun, 31 Aug 2014 22:19:29 +0300 Subject: [PATCH] Code review fix: convert list into variables. --- gooey/code_prep.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gooey/code_prep.py b/gooey/code_prep.py index a9fc220..34b13ef 100644 --- a/gooey/code_prep.py +++ b/gooey/code_prep.py @@ -38,8 +38,8 @@ def split_line(line): # splits an assignment statement into varname and command strings # in: "parser = ArgumentParser(description='Example Argparse Program')" # out: "parser", "ArgumentParser(description='Example Argparse Program" - pieces = line.split('=', 1) - return pieces[0].strip(), ''.join(pieces[1:]).lstrip() + variable, instruction = line.split('=', 1) + return variable.strip(), instruction.strip() def update_parser_varname(new_varname, code): # lines = source.split('\n')[1:]