Skip to content

Commit

Permalink
remove future
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudbore committed Jun 7, 2023
1 parent ff90a43 commit b2eba4a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions dcm2bids/acquisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import logging
from os.path import join as opj
from future.utils import iteritems

from dcm2bids.utils.utils import DEFAULT
from dcm2bids.utils.tools import __version__
Expand Down Expand Up @@ -227,7 +226,7 @@ def dstSidecarData(self, descriptions, intendedForList):
data["IntendedFor"] = intendedValue

# sidecarChanges
for key, value in iteritems(self.sidecarChanges):
for key, value in self.sidecarChanges.items():
data[key] = value

return data
Expand Down
8 changes: 4 additions & 4 deletions dcm2bids/sidecar.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import re
from collections import defaultdict, OrderedDict
from fnmatch import fnmatch
from future.utils import iteritems

from dcm2bids.acquisition import Acquisition
from dcm2bids.utils.utils import DEFAULT, splitext_
from dcm2bids.utils.io import load_json
Expand Down Expand Up @@ -190,7 +190,7 @@ def compare(name, pattern):

result = []

for tag, pattern in iteritems(criteria):
for tag, pattern in criteria.items():
name = data.get(tag, '')

if isinstance(name, list):
Expand Down Expand Up @@ -218,7 +218,7 @@ def build_acquisitions(self, participant):
acquisitions_intendedFor = []

self.logger.info("Sidecars pairing:")
for sidecar, valid_descriptions in iteritems(self.graph):
for sidecar, valid_descriptions in self.graph.items():
sidecarName = os.path.basename(sidecar.root)

# only one description for the sidecar
Expand Down Expand Up @@ -274,7 +274,7 @@ def duplicates(seq):
for i, item in enumerate(seq):
tally[item].append(i)

for key, locs in iteritems(tally):
for key, locs in tally.items():
if len(locs) > 1:
yield key, locs

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
license=LICENSE,
classifiers=CLASSIFIERS,
platforms=PLATFORMS,
python_requires=">=3.7",
install_requires=['future>=0.17.1', 'packaging>=23.1'],
python_requires=">3.7",
install_requires=['packaging>=23.1'],
version=VERSION,
packages=find_packages(exclude=["tests"]),
entry_points=ENTRY_POINTS)
Expand Down

0 comments on commit b2eba4a

Please sign in to comment.