Skip to content

Commit e0e8227

Browse files
committed
minor pep8ing
1 parent 2514875 commit e0e8227

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

heudiconv/external/dlad.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,25 @@
1010

1111
MIN_VERSION = '0.7'
1212

13+
1314
def prepare_datalad(studydir, outdir, sid, session, seqinfo, dicoms, bids):
1415
""" Prepare data for datalad """
16+
from datalad.api import Dataset
1517
datalad_msg_suf = ' %s' % sid
1618
if session:
1719
datalad_msg_suf += ", session %s" % session
1820
if seqinfo:
1921
datalad_msg_suf += ", %d sequences" % len(seqinfo)
2022
datalad_msg_suf += ", %d dicoms" % (len(sum(seqinfo.values(), []))
2123
if seqinfo else len(dicoms))
22-
from datalad.api import Dataset
2324
ds = Dataset(studydir)
2425
if not op.exists(outdir) or not ds.is_installed():
2526
add_to_datalad(outdir, studydir,
2627
msg="Preparing for %s" % datalad_msg_suf,
2728
bids=bids)
2829
return datalad_msg_suf
2930

31+
3032
def add_to_datalad(topdir, studydir, msg, bids):
3133
"""Do all necessary preparations (if were not done before) and save
3234
"""
@@ -35,7 +37,7 @@ def add_to_datalad(topdir, studydir, msg, bids):
3537
from datalad.support.annexrepo import AnnexRepo
3638
from datalad.support.external_versions import external_versions
3739
assert external_versions['datalad'] >= MIN_VERSION, (
38-
"Need datalad >= {}".format(MIN_VERSION)) # add to reqs
40+
"Need datalad >= {}".format(MIN_VERSION)) # add to reqs
3941

4042
studyrelpath = op.relpath(studydir, topdir)
4143
assert not studyrelpath.startswith(op.pardir) # so we are under

0 commit comments

Comments
 (0)