Mercurial > repos > guerler > springsuite
comparison planemo/lib/python3.7/site-packages/galaxy/tool_util/parser/util.py @ 1:56ad4e20f292 draft
"planemo upload commit 6eee67778febed82ddd413c3ca40b3183a3898f1"
author | guerler |
---|---|
date | Fri, 31 Jul 2020 00:32:28 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:d30785e31577 | 1:56ad4e20f292 |
---|---|
1 from collections import OrderedDict | |
2 | |
3 DEFAULT_DELTA = 10000 | |
4 DEFAULT_DELTA_FRAC = None | |
5 | |
6 | |
7 def is_dict(item): | |
8 return isinstance(item, dict) or isinstance(item, OrderedDict) | |
9 | |
10 | |
11 def _parse_name(name, argument): | |
12 """Determine name of an input source from name and argument | |
13 returns the name or if absent the argument property | |
14 In the latter case, leading dashes are stripped and | |
15 all remaining dashes are replaced by underscores. | |
16 """ | |
17 if name is None: | |
18 if not argument: | |
19 raise ValueError("parameter must specify a 'name' or 'argument'.") | |
20 name = argument.lstrip('-').replace("-", "_") | |
21 return name |