Skip to content

Commit de6087c

Browse files
committed
[DATALAD RUNCMD] isort the gitrepo we modified
=== Do not change lines below === { "chain": [], "cmd": "python3 -m isort -m3 --fgw 2 --tc {outputs}", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [ "heudiconv/bids/*py", "heudiconv/bids/tests/*py" ], "pwd": "." } ^^^ Do not change lines above ^^^
1 parent 08390bd commit de6087c

File tree

3 files changed

+43
-47
lines changed

3 files changed

+43
-47
lines changed

heudiconv/bids/schema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
from pathlib import Path
1+
import logging
22
import re
3+
from pathlib import Path
4+
35
import yaml
46

57
from heudiconv.utils import remove_prefix
68

7-
import logging
8-
99
lgr = logging.getLogger(__name__)
1010

1111

heudiconv/bids/tests/test_utils.py

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,50 @@
11
"""Test functions of heudiconv.bids.utils module.
22
"""
33

4-
import re
54
import os
65
import os.path as op
7-
from pathlib import Path
8-
from random import (random,
9-
choice,
10-
seed
11-
)
12-
from datetime import (datetime,
13-
timedelta,
14-
)
15-
from collections import (OrderedDict,
16-
)
6+
import re
7+
import string
8+
from collections import OrderedDict
9+
from datetime import (
10+
datetime,
11+
timedelta,
12+
)
1713
from glob import glob
14+
from pathlib import Path
15+
from random import (
16+
choice,
17+
random,
18+
seed,
19+
)
1820

1921
import nibabel
20-
import string
22+
import pytest
2123
from numpy import testing as np_testing
2224

25+
from heudiconv.tests.utils import TESTS_DATA_PATH
2326
from heudiconv.utils import (
24-
load_json,
25-
save_json,
2627
create_tree,
28+
load_json,
2729
remove_suffix,
30+
save_json,
2831
)
2932

3033
from .. import (
31-
maybe_na,
32-
treat_age,
33-
find_fmap_groups,
34-
populate_intended_for,
35-
get_shim_setting,
36-
get_key_info_for_fmap_assignment,
37-
find_compatible_fmaps_for_run,
38-
find_compatible_fmaps_for_session,
39-
select_fmap_from_compatible_groups,
4034
SHIM_KEY,
4135
AllowedCriteriaForFmapAssignment,
4236
KeyInfoForForce,
37+
find_compatible_fmaps_for_run,
38+
find_compatible_fmaps_for_session,
39+
find_fmap_groups,
40+
get_key_info_for_fmap_assignment,
41+
get_shim_setting,
42+
maybe_na,
43+
populate_intended_for,
44+
select_fmap_from_compatible_groups,
45+
treat_age,
4346
)
4447

45-
from heudiconv.tests.utils import (
46-
TESTS_DATA_PATH,
47-
)
48-
49-
import pytest
5048

5149
def gen_rand_label(label_size, label_seed, seed_stdout=True):
5250
seed(label_seed)

heudiconv/bids/utils.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,36 @@
11
"""Handle BIDS specific operations"""
22

3+
import csv
4+
import errno
35
import hashlib
6+
import logging
47
import os
58
import os.path as op
6-
import logging
7-
import numpy as np
89
import re
910
from collections import OrderedDict
1011
from datetime import datetime
11-
import csv
12-
from random import sample
1312
from glob import glob
14-
import errno
13+
from random import sample
1514

16-
from ..external.pydicom import dcm
15+
import numpy as np
1716

17+
from .. import __version__
18+
from ..external.pydicom import dcm
1819
from ..parser import find_files
1920
from ..utils import (
20-
load_json,
21-
save_json,
2221
create_file_if_missing,
23-
json_dumps,
24-
update_json,
25-
set_readonly,
26-
is_readonly,
2722
get_datetime,
28-
remove_suffix,
23+
is_readonly,
24+
json_dumps,
25+
load_json,
2926
remove_prefix,
27+
remove_suffix,
28+
save_json,
29+
set_readonly,
30+
update_json,
3031
)
31-
from .. import __version__
32-
3332
from .schema import BIDSFile
3433

35-
3634
lgr = logging.getLogger(__name__)
3735

3836
# Fields to be populated in _scans files. Order matters

0 commit comments

Comments
 (0)