Skip to content

Commit 05ab6ea

Browse files
committed
Fixed flake8 warnings
1 parent b208764 commit 05ab6ea

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

Packages/vcs/Lib/VTKPlots.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,6 @@ def fitToViewport(self, Actor, vp, wc=None, geo=None, priority=None,
11371137
else:
11381138
flipX = False
11391139

1140-
11411140
if geo is not None:
11421141
pt = vtk.vtkPoints()
11431142
Xrg2 = [1.e20, -1.e20]
@@ -1156,7 +1155,6 @@ def fitToViewport(self, Actor, vp, wc=None, geo=None, priority=None,
11561155
pt.InsertPoint(NGridCover, x, y, 0)
11571156
NGridCover += 1
11581157
pts = vtk.vtkPoints()
1159-
#pts.SetNumberOfPoints(Npts*Npts)
11601158
geo.TransformPoints(pt, pts)
11611159
b = pts.GetBounds()
11621160
xm, xM, ym, yM = b[:4]

Packages/vcs/Lib/vcs2vtk.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
for i in range(len(projNames)):
5454
projDict[i] = projNames[i]
5555

56+
5657
def applyAttributesFromVCStmpl(tmpl, tmplattribute, txtobj=None):
5758
tatt = getattr(tmpl, tmplattribute)
5859
if txtobj is None:
@@ -142,6 +143,7 @@ def handleProjectionEdgeCases(projection, data):
142143
data = data(latitude=(max(-85, lat.min()), min(85, lat.max())))
143144
return data
144145

146+
145147
def genGridOnPoints(data1, gm, deep=True, grid=None, geo=None,
146148
skipReprojection=False, data2=None):
147149
continents = False
@@ -542,6 +544,7 @@ def prepContinents(fnm):
542544
vcsContinents[fnm] = poly
543545
return poly
544546

547+
545548
def projectArray(w, projection, wc, geo=None):
546549
xm, xM, ym, yM = wc
547550
if isinstance(projection, (str, unicode)):
@@ -576,6 +579,7 @@ def projectArray(w, projection, wc, geo=None):
576579
geo.TransformPoint(tuple, tuple)
577580
w.SetTupleValue(i, tuple)
578581

582+
579583
# Geo projection
580584
def project(pts, projection, wc, geo=None):
581585
xm, xM, ym, yM = wc

Packages/vcs/Lib/vcsvtk/vectorpipeline.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import math
88

9+
910
class VectorPipeline(Pipeline):
1011

1112
"""Implementation of the Pipeline interface for VCS vector plots."""
@@ -35,13 +36,12 @@ def plot(self, data1, data2, tmpl, grid, transform):
3536
lon = data1.getLongitude()[:]
3637

3738
if projection is not None:
38-
scale = (lat.max() - lat.min()) * (lon.max() - lon.min())
39+
scale = (lat.max() - lat.min()) * (lon.max() - lon.min())
3940

4041
gridGenDict = vcs2vtk.genGridOnPoints(data1, self._gm, deep=False, grid=grid,
4142
geo=transform, skipReprojection=False,
4243
data2=data2)
4344

44-
4545
data1 = gridGenDict["data"]
4646
data2 = gridGenDict["data2"]
4747
geo = gridGenDict["geo"]
@@ -60,7 +60,7 @@ def plot(self, data1, data2, tmpl, grid, transform):
6060

6161
vcs2vtk.projectArray(newv, projection,
6262
[gridGenDict['xm'], gridGenDict['xM'],
63-
gridGenDict['ym'], gridGenDict['yM'],])
63+
gridGenDict['ym'], gridGenDict['yM']])
6464
dimMin = [0, 0, 0]
6565
dimMax = [0, 0, 0]
6666
newv.GetTupleValue(0, dimMin)
@@ -125,7 +125,6 @@ def plot(self, data1, data2, tmpl, grid, transform):
125125
glyphFilter.SetRange(0.01, 1.0)
126126

127127
mapper = vtk.vtkPolyDataMapper()
128-
writer = vtk.vtkXMLPolyDataWriter()
129128

130129
glyphFilter.Update()
131130
data = glyphFilter.GetOutput()
@@ -154,9 +153,8 @@ def plot(self, data1, data2, tmpl, grid, transform):
154153
priority=tmpl.data.priority,
155154
create_renderer=True)
156155

157-
158-
returned.update(
159-
self._context().renderTemplate(tmpl, data1, self._gm, taxis, zaxis))
156+
returned.update(self._context().renderTemplate(tmpl, data1,
157+
self._gm, taxis, zaxis))
160158

161159
if self._context().canvas._continents is None:
162160
continents = False

0 commit comments

Comments
 (0)