comparison load_db.py @ 7:b722161a845a draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/query_tabular commit a4b0969b33a68a0ea9ba12291f6694aec24f13ed
author iuc
date Tue, 30 Oct 2018 20:20:21 -0400
parents 150765965caa
children 4678715f7147
comparison
equal deleted inserted replaced
6:fe5036ccfdc3 7:b722161a845a
140 valid_name = name 140 valid_name = name
141 if not name or not name.strip(): 141 if not name or not name.strip():
142 return None 142 return None
143 elif name.upper() in SQLITE_KEYWORDS: 143 elif name.upper() in SQLITE_KEYWORDS:
144 valid_name = '"%s"' % name 144 valid_name = '"%s"' % name
145 elif re.match('^[a-zA-Z]\w*$', name): 145 elif re.match(r'^[a-zA-Z]\w*$', name):
146 pass 146 pass
147 elif re.match('^"[^"]+"$', name): 147 elif re.match(r'^"[^"]+"$', name):
148 pass 148 pass
149 elif re.match('^\[[^\[\]]*\]$', name): 149 elif re.match(r'^\[[^\[\]]*\]$', name):
150 pass 150 pass
151 elif re.match("^`[^`]+`$", name): 151 elif re.match(r"^`[^`]+`$", name):
152 pass 152 pass
153 elif name.find('"') < 0: 153 elif name.find('"') < 0:
154 valid_name = '"%s"' % name 154 valid_name = '"%s"' % name
155 elif name.find('[') < 0 and name.find(']') < 0: 155 elif name.find('[') < 0 and name.find(']') < 0:
156 valid_name = '[%s]' % name 156 valid_name = '[%s]' % name