]> git.phdru.name Git - sqlconvert.git/commitdiff
Refactor 'else if' to 'elif'
authorOleg Broytman <phd@phdru.name>
Thu, 4 Aug 2016 17:00:42 +0000 (20:00 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 4 Aug 2016 17:00:42 +0000 (20:00 +0300)
mysql2sql/process_tokens.py

index e9a62f825a6d5625dcd6dfc2e03b2f150208a12b..70dadb23bf6080b7764154e8ef3356763e552e37 100644 (file)
@@ -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