Skip to content

Commit 4a84a02

Browse files
committed
RF: Remove builtins
1 parent 1108430 commit 4a84a02

File tree

134 files changed

+26
-894
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+26
-894
lines changed

nipype/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
33
# vi: set ft=python sts=4 ts=4 sw=4 et:
4-
from __future__ import (print_function, division, unicode_literals,
5-
absolute_import)
6-
74
import os
85
from distutils.version import LooseVersion
96

nipype/algorithms/confounds.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
'''
55
Algorithms to compute confounds in :abbr:`fMRI (functional MRI)`
66
'''
7-
from __future__ import (print_function, division, unicode_literals,
8-
absolute_import)
9-
from builtins import range
10-
117
import os
128
import os.path as op
139

nipype/algorithms/icc.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
from __future__ import (print_function, division, unicode_literals,
3-
absolute_import)
4-
from builtins import range
52
import os
63
import numpy as np
74
from numpy import ones, kron, mean, eye, hstack, dot, tile

nipype/algorithms/mesh.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
"""
55
Miscellaneous algorithms for 2D contours and 3D triangularized meshes handling
66
"""
7-
from __future__ import (print_function, division, unicode_literals,
8-
absolute_import)
9-
from builtins import zip, str, bytes
10-
117
import os.path as op
128
import numpy as np
139
from numpy import linalg as nla

nipype/algorithms/metrics.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
Image assessment algorithms. Typical overlap and error computation
66
measures to evaluate results from other processing units.
77
'''
8-
from __future__ import (print_function, division, unicode_literals,
9-
absolute_import)
10-
from builtins import zip, range
11-
128
import os
139
import os.path as op
1410

nipype/algorithms/misc.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
'''
55
Miscellaneous algorithms
66
'''
7-
from __future__ import (print_function, division, unicode_literals,
8-
absolute_import)
9-
from builtins import str, zip, range, open
10-
from future.utils import raise_from
11-
127
import os
138
import os.path as op
149

@@ -794,9 +789,8 @@ def _run_interface(self, runtime):
794789
try:
795790
import pandas as pd
796791
except ImportError as e:
797-
raise_from(
798-
ImportError('This interface requires pandas '
799-
'(http://pandas.pydata.org/) to run.'), e)
792+
raise ImportError('This interface requires pandas '
793+
'(http://pandas.pydata.org/) to run.') from e
800794

801795
try:
802796
import lockfile as pl

nipype/algorithms/modelgen.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
1212
* SpecifyModel: allows specification of sparse and non-sparse models
1313
"""
14-
from __future__ import (print_function, division, unicode_literals,
15-
absolute_import)
16-
from builtins import range, str, bytes, int
17-
1814
from copy import deepcopy
1915
import os
2016

nipype/algorithms/rapidart.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
* StimulusCorrelation: determines correlation between stimuli
1313
schedule and movement/intensity parameters
1414
"""
15-
from __future__ import (print_function, division, unicode_literals,
16-
absolute_import)
17-
from builtins import open, range, str, bytes
18-
1915
import os
2016
from copy import deepcopy
2117

nipype/algorithms/stats.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
"""
55
Managing statistical maps
66
"""
7-
from __future__ import (print_function, division, unicode_literals,
8-
absolute_import)
97
import os
108
import nibabel as nb
119
import numpy as np

nipype/algorithms/tests/test_icc_anova.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
from __future__ import division
32
import numpy as np
43
from nipype.algorithms.icc import ICC_rep_anova
54

nipype/algorithms/tests/test_normalize_tpms.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
44
# vi: set ft=python sts=4 ts=4 sw=4 et:
55

6-
from builtins import range
76
import os
87

98
import pytest

nipype/algorithms/tests/test_rapidart.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
33
# vi: set ft=python sts=4 ts=4 sw=4 et:
4-
from __future__ import division
5-
64
import numpy as np
75

86
import numpy.testing as npt

nipype/caching/memory.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
Using nipype with persistence and lazy recomputation but without explicit
44
name-steps pipeline: getting back scope in command-line based programming.
55
"""
6-
from __future__ import (print_function, division, unicode_literals,
7-
absolute_import)
8-
from builtins import object, open
9-
106
import os
117
import hashlib
128
import pickle

nipype/info.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
settings in setup.py, the nipy top-level docstring, and for building the
33
docs. In setup.py in particular, we exec this file, so it cannot import nipy
44
"""
5-
from __future__ import (print_function, division, unicode_literals,
6-
absolute_import)
7-
85
import sys
96

107
# nipype version information. An empty version_extra corresponds to a

nipype/interfaces/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
77
Requires Packages to be installed
88
"""
9-
from __future__ import (print_function, division, unicode_literals,
10-
absolute_import)
119
__docformat__ = 'restructuredtext'
1210

1311
from .io import DataGrabber, DataSink, SelectFiles, BIDSDataGrabber

nipype/interfaces/afni/base.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
33
# vi: set ft=python sts=4 ts=4 sw=4 et:
44
"""Provide interface to AFNI commands."""
5-
from __future__ import (print_function, division, unicode_literals,
6-
absolute_import)
7-
from builtins import object, str
8-
from future.utils import raise_from
9-
105
import os
116
from sys import platform
127
from distutils import spawn
@@ -63,7 +58,7 @@ def output_type_to_ext(cls, outputtype):
6358
return cls.ftypes[outputtype]
6459
except KeyError as e:
6560
msg = 'Invalid AFNIOUTPUTTYPE: ', outputtype
66-
raise_from(KeyError(msg), e)
61+
raise KeyError(msg) from e
6762

6863
@classmethod
6964
def outputtype(cls):

nipype/interfaces/afni/preprocess.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
# vi: set ft=python sts=4 ts=4 sw=4 et:
44
"""AFNI preprocessing interfaces
55
"""
6-
from __future__ import (print_function, division, unicode_literals,
7-
absolute_import)
8-
from builtins import open
9-
106
import os
117
import os.path as op
128

nipype/interfaces/afni/utils.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
--------
88
See the docstrings of the individual classes for examples.
99
"""
10-
from __future__ import (print_function, division, unicode_literals,
11-
absolute_import)
12-
from builtins import str, bytes
13-
1410
import os
1511
import os.path as op
1612
import re

nipype/interfaces/ants/base.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
33
# vi: set ft=python sts=4 ts=4 sw=4 et:
44
"""The ants module provides basic functions for interfacing with ANTS tools."""
5-
from __future__ import (print_function, division, unicode_literals,
6-
absolute_import)
7-
from builtins import str
8-
95
import os
106

117
# Local imports

0 commit comments

Comments
 (0)