Commit 8f45488a authored by Nicolas Vuaille's avatar Nicolas Vuaille

Fix some flake8 errors

parent 5f62ba46
......@@ -122,7 +122,7 @@ class RasterWrangler(object):
elif extension == 'jpg' or extension == 'jpeg':
return vtkJPEGWriter()
elif extension == 'vti':
return vtkXMLImageDataWriter() # noqa: E731
return vtkXMLImageDataWriter() # noqa: F821
else:
raise RuntimeError(
"Cannot infer filetype from extension:", extension)
......@@ -148,7 +148,7 @@ class RasterWrangler(object):
elif extension == 'jpg' or extension == 'jpeg':
return vtkJPEGReader()
elif extension == 'vti':
return vtkXMLImageDataReader() # noqa: E731
return vtkXMLImageDataReader() # noqa: F821
else:
raise RuntimeError(
"Cannot infer filetype from extension:", extension)
......@@ -371,7 +371,8 @@ class RasterWrangler(object):
with open(adjustedName, mode='rb') as file:
with numpy.load(file) as tz:
if not isinstance(tz[tz.files[0]], numpy.ndarray):
raise IOError(adjustedName + " does not load correctly.")
raise IOError(
adjustedName + " does not load correctly.")
return
if not os.path.isfile(filename):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment