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
Michiel Cottaar
fslpy
Commits
33640abf
Commit
33640abf
authored
Nov 05, 2019
by
Paul McCarthy
🚵
Browse files
BF: isBIDSFile should return boolean
parent
a7543878
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/utils/bids.py
View file @
33640abf
...
...
@@ -150,7 +150,7 @@ def isBIDSFile(filename, strict=True):
name
=
op
.
basename
(
filename
)
pattern
=
r
'([a-z0-9]+-[a-z0-9]+_)*([a-z0-9])+\.(nii|nii\.gz|json)'
flags
=
re
.
ASCII
|
re
.
IGNORECASE
match
=
re
.
fullmatch
(
pattern
,
name
,
flags
)
match
=
re
.
fullmatch
(
pattern
,
name
,
flags
)
is
not
None
return
((
not
strict
)
or
inBIDSDir
(
filename
))
and
match
...
...
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