From: Oleg Broytman Date: Thu, 4 Aug 2016 17:00:42 +0000 (+0300) Subject: Refactor 'else if' to 'elif' X-Git-Tag: 0.0.1~41 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=5654b305081bc195027ce00302b38af1fb0e249b;p=sqlconvert.git Refactor 'else if' to 'elif' --- diff --git a/mysql2sql/process_tokens.py b/mysql2sql/process_tokens.py index e9a62f8..70dadb2 100644 --- a/mysql2sql/process_tokens.py +++ b/mysql2sql/process_tokens.py @@ -8,12 +8,11 @@ def requote_names(token_list): for token in token_list: if isinstance(token, TokenList): requote_names(token) - else: - if token.ttype is Name: - value = token.value - if (value[0] == "`") and (value[-1] == "`"): - value = value[1:-1] - if value.islower(): - token.normalized = token.value = value - else: - token.normalized = token.value = '"%s"' % value + elif token.ttype is Name: + value = token.value + if (value[0] == "`") and (value[-1] == "`"): + value = value[1:-1] + if value.islower(): + token.normalized = token.value = value + else: + token.normalized = token.value = '"%s"' % value