diff --git a/.flake8 b/.flake8 index 47fa3239a24..8a4bf960bf5 100644 --- a/.flake8 +++ b/.flake8 @@ -153,9 +153,7 @@ per-file-ignores = python/grass/*/*/__init__.py: F401, F403 python/grass/*/*/*/__init__.py: F401, F403 # E402 module level import not at top of file - scripts/d.polar/d.polar.py: F841 - scripts/r.in.wms/wms_gdal_drv.py: F841, E722 - scripts/r.in.wms/wms_cap_parsers.py: F841 + scripts/r.in.wms/wms_gdal_drv.py: E722 scripts/r.in.wms/wms_drv.py: E402, E722 scripts/r.in.wms/srs.py: E722 scripts/r.semantic.label/r.semantic.label.py: E501 diff --git a/scripts/d.polar/d.polar.py b/scripts/d.polar/d.polar.py index 4ef578d5676..f592dd89b63 100755 --- a/scripts/d.polar/d.polar.py +++ b/scripts/d.polar/d.polar.py @@ -202,7 +202,6 @@ def plot_eps(psout): epsscale = 0.1 frameallowance = 1.1 halfframe = 3000 - center = (halfframe, halfframe) scale = halfframe / (outerradius * frameallowance) diagramlinewidth = halfframe / 400 @@ -211,11 +210,6 @@ def plot_eps(psout): diagramfontsize = halfframe / 20 halfframe_2 = halfframe * 2 - averagedirectioncolor = 1 # (blue) - diagramcolor = 4 # (red) - circlecolor = 2 # (green) - axescolor = 0 # (black) - northjustification = 2 eastjustification = 6 southjustification = 8 @@ -287,7 +281,6 @@ def plot_eps(psout): ) outf.write(s) - sublength = len(outercircle) - 2 (x, y) = outercircle[1] outf.write("%.2f %.2f moveto\n" % (x * scale + halfframe, y * scale + halfframe)) for x, y in outercircle[2:]: @@ -343,7 +336,6 @@ def plot_eps(psout): ) outf.write(s) - sublength = len(sine_cosine_replic) - 2 (x, y) = sine_cosine_replic[1] outf.write("%.2f %.2f moveto\n" % (x * scale + halfframe, y * scale + halfframe)) for x, y in sine_cosine_replic[2:]: @@ -369,7 +361,6 @@ def plot_eps(psout): s = t.substitute(DIAGRAMLINEWIDTH=diagramlinewidth) outf.write(s) - sublength = len(vector) - 2 (x, y) = vector[1] outf.write("%.2f %.2f moveto\n" % (x * scale + halfframe, y * scale + halfframe)) for x, y in vector[2:]: diff --git a/scripts/r.in.wms/wms_cap_parsers.py b/scripts/r.in.wms/wms_cap_parsers.py index f9b0f7095fb..5483be0979f 100644 --- a/scripts/r.in.wms/wms_cap_parsers.py +++ b/scripts/r.in.wms/wms_cap_parsers.py @@ -131,7 +131,7 @@ def _checkFormats(self, capability): """!Check if format element is defined.""" request = self._find(capability, "Request") get_map = self._find(request, "GetMap") - formats = self._findall(get_map, "Format") + self._findall(get_map, "Format") def _checkLayerTree(self, parent_layer, first=True): """!Recursively check layer tree and manage inheritance in the tree""" diff --git a/scripts/r.in.wms/wms_gdal_drv.py b/scripts/r.in.wms/wms_gdal_drv.py index 6d30f5817f3..d17bac11eee 100644 --- a/scripts/r.in.wms/wms_gdal_drv.py +++ b/scripts/r.in.wms/wms_gdal_drv.py @@ -60,7 +60,6 @@ def _createXML(self): gdal_wms = ET.Element("GDAL_WMS") service = ET.SubElement(gdal_wms, "Service") - name = ET.Element("name") service.set("name", "WMS") version = ET.SubElement(service, "Version")