Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
34edfae0
Commit
34edfae0
authored
Mar 06, 2019
by
Paul McCarthy
🚵
Browse files
BF: Ensure that data structure returned by query.variables method cannot
mutate canonical version
parent
19571ee6
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/utils/filetree/query.py
View file @
34edfae0
...
...
@@ -132,10 +132,10 @@ class FileTreeQuery(object):
files of that ``short_name`` type are returned.
"""
if
short_name
is
None
:
return
dict
(
self
.
__allvars
)
return
{
var
:
list
(
vals
)
for
var
,
vals
in
self
.
__allvars
.
items
()}
else
:
varnames
=
self
.
__shortnamevars
[
short_name
]
return
{
var
:
self
.
__allvars
[
var
]
for
var
in
varnames
}
return
{
var
:
list
(
self
.
__allvars
[
var
]
)
for
var
in
varnames
}
@
property
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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