We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d3cfb41 + e84ada2 commit ae12343Copy full SHA for ae12343
nipype/algorithms/modelgen.py
@@ -7,7 +7,9 @@
7
experiments.
8
"""
9
from copy import deepcopy
10
-import csv, math, os
+import csv
11
+import math
12
+import os
13
14
from nibabel import load
15
import numpy as np
nipype/interfaces/base/tests/test_support.py
@@ -35,7 +35,7 @@ def test_bunch_methods():
35
assert b.get("a") == 3
36
assert b.get("badkey", "otherthing") == "otherthing"
37
assert b != newb
38
- assert type(dict()) ==type(newb)
+ assert type(newb) isdict
39
assert newb["a"] == 3
40
41
nipype/interfaces/fsl/tests/test_base.py
@@ -37,7 +37,7 @@ def test_FSLCommand():
# testing the one item that is not.
cmd = fsl.FSLCommand(command="ls")
res = cmd.run()
- assert type(res) == InterfaceResult
+ assert type(res) is InterfaceResult
42
43
@pytest.mark.skipif(no_fsl(), reason="fsl is not installed")
nipype/pipeline/engine/tests/test_workflows.py
@@ -20,7 +20,7 @@ def test_init():
20
with pytest.raises(TypeError):
21
pe.Workflow()
22
pipe = pe.Workflow(name="pipe")
23
- assert type(pipe._graph) == nx.DiGraph
+ assert type(pipe._graph) is nx.DiGraph
24
25
26
def test_connect():
nipype/pipeline/plugins/dagman.py
@@ -78,7 +78,7 @@ def __init__(self, **kwargs):
78
):
79
if (
80
"plugin_args" in kwargs
81
- and notkwargs["plugin_args"] is None
+ and kwargs["plugin_args"] isnot None
82
and id_ in kwargs["plugin_args"]
83
84
if id_ == "wrapper_cmd":
@@ -89,7 +89,7 @@ def __init__(self, **kwargs):
89
val = self._get_str_or_file(kwargs["plugin_args"][id_])
90
setattr(self, var, val)
91
# TODO remove after some time
92
- if "plugin_args" in kwargs and notkwargs["plugin_args"] is None:
+ if "plugin_args" in kwargs and kwargs["plugin_args"] isnot None:
93
plugin_args = kwargs["plugin_args"]
94
if "template" in plugin_args:
95
warn(
nipype/scripts/utils.py
@@ -71,12 +71,12 @@ def add_args_options(arg_parser, interface):
71
if not spec.is_trait_type(traits.TraitCompound):
72
trait_type = type(spec.trait_type.default_value)
73
if trait_type in (bytes, str, int, float):
74
- if trait_type == bytes:
+ if trait_type is bytes:
75
trait_type = str
76
args["type"] = trait_type
77
elif len(spec.inner_traits) == 1:
trait_type = type(spec.inner_traits[0].trait_type.default_value)
if trait_type in (bytes, bool, str, int, float):
tools/checkspecs.py
@@ -301,7 +301,7 @@ def test_specs(self, uri):
301
bad_specs.append(
302
[uri, c, "Inputs", traitname, "mandatory=False"]
303
)
304
- if key == "usedefault" and trait.__dict__[key] == False:
+ if key == "usedefault" and trait.__dict__[key] is False:
305
306
[uri, c, "Inputs", traitname, "usedefault=False"]
307
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments