Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
076c896a
Commit
076c896a
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
RF: Raw strings for regexps
parent
e6a4d1f8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fsl/data/dicom.py
+5
-5
5 additions, 5 deletions
fsl/data/dicom.py
fsl/data/dtifit.py
+1
-1
1 addition, 1 deletion
fsl/data/dtifit.py
fsl/version.py
+1
-1
1 addition, 1 deletion
fsl/version.py
with
7 additions
and
7 deletions
fsl/data/dicom.py
+
5
−
5
View file @
076c896a
...
@@ -120,11 +120,11 @@ def enabled():
...
@@ -120,11 +120,11 @@ def enabled():
cmd
=
'
dcm2niix -h
'
cmd
=
'
dcm2niix -h
'
versionPattern
=
re
.
compile
(
r
'
v
'
versionPattern
=
re
.
compile
(
r
'
v
'
'
(?P<major>[0-9]+)\.
'
r
'
(?P<major>[0-9]+)\.
'
'
(?P<minor>[0-9]+)\.
'
r
'
(?P<minor>[0-9]+)\.
'
'
(?P<year>[0-9]{4})
'
r
'
(?P<year>[0-9]{4})
'
'
(?P<month>[0-9]{2})
'
r
'
(?P<month>[0-9]{2})
'
'
(?P<day>[0-9]{2})
'
)
r
'
(?P<day>[0-9]{2})
'
)
try
:
try
:
output
=
sp
.
check_output
(
cmd
.
split
()).
decode
()
output
=
sp
.
check_output
(
cmd
.
split
()).
decode
()
...
...
This diff is collapsed.
Click to expand it.
fsl/data/dtifit.py
+
1
−
1
View file @
076c896a
...
@@ -50,7 +50,7 @@ def getDTIFitDataPrefix(path):
...
@@ -50,7 +50,7 @@ def getDTIFitDataPrefix(path):
# Gather all of the existing file
# Gather all of the existing file
# prefixes into a dictionary of
# prefixes into a dictionary of
# prefix : [file list] mappings.
# prefix : [file list] mappings.
pattern
=
'
^(.*)_(?:V1|V2|V3|L1|L2|L3).*$
'
pattern
=
r
'
^(.*)_(?:V1|V2|V3|L1|L2|L3).*$
'
prefixes
=
{}
prefixes
=
{}
for
f
in
[
f
for
flist
in
files
for
f
in
flist
]:
for
f
in
[
f
for
flist
in
files
for
f
in
flist
]:
...
...
This diff is collapsed.
Click to expand it.
fsl/version.py
+
1
−
1
View file @
076c896a
...
@@ -130,7 +130,7 @@ def patchVersion(filename, newversion):
...
@@ -130,7 +130,7 @@ def patchVersion(filename, newversion):
with
open
(
filename
,
'
rt
'
)
as
f
:
with
open
(
filename
,
'
rt
'
)
as
f
:
lines
=
f
.
readlines
()
lines
=
f
.
readlines
()
pattern
=
re
.
compile
(
'
^__version__ *= *
\'
.*
\'
*$
'
)
pattern
=
re
.
compile
(
r
'
^__version__ *= *\'.*\' *$
'
)
for
i
,
line
in
enumerate
(
lines
):
for
i
,
line
in
enumerate
(
lines
):
if
pattern
.
match
(
line
):
if
pattern
.
match
(
line
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment