Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tomotools
Nabu
Commits
29f1aca4
Commit
29f1aca4
authored
Apr 29, 2021
by
Pierre Paleo
Browse files
Robustify extract_parameters
parent
2eb5854d
Changes
1
Hide whitespace changes
Inline
Side-by-side
nabu/resources/utils.py
View file @
29f1aca4
...
...
@@ -94,6 +94,8 @@ def extract_parameters(params_str, sep=";"):
>>> extract_parameters("window_width=None; median_filt_shape=(3,3); padding_mode='wrap'")
... {'window_width': None, 'median_filt_shape': (3, 3), 'padding_mode': 'wrap'}
"""
if
params_str
in
(
""
,
None
):
return
{}
params_list
=
params_str
.
strip
(
sep
).
split
(
sep
)
res
=
{}
for
param_str
in
params_list
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment