comparison load_db.py @ 7:34d29339abab 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:18:57 -0400
parents 4a9b1cb3639b
children 69b08fc9557c
comparison
equal deleted inserted replaced
6:5c1b09e05757 7:34d29339abab
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