comparison load_db.py @ 7:33d61c89fb8d 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:19:30 -0400
parents fb8484ee54d8
children a3aab6045663
comparison
equal deleted inserted replaced
6:ad79e7bb1a9e 7:33d61c89fb8d
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