Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checks: flake8 F841 (local variable assigned to but never used) fixes in scripts directory part 1 #4238

Merged
merged 3 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,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: F841, E501
Expand Down
9 changes: 0 additions & 9 deletions scripts/d.polar/d.polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:]:
Expand Down Expand Up @@ -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:]:
Expand All @@ -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:]:
Expand Down
2 changes: 1 addition & 1 deletion scripts/r.in.wms/wms_cap_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
petrasovaa marked this conversation as resolved.
Show resolved Hide resolved

def _checkLayerTree(self, parent_layer, first=True):
"""!Recursively check layer tree and manage inheritance in the tree"""
Expand Down
1 change: 0 additions & 1 deletion scripts/r.in.wms/wms_gdal_drv.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def _createXML(self):

gdal_wms = ET.Element("GDAL_WMS")
service = ET.SubElement(gdal_wms, "Service")
name = ET.Element("name")
echoix marked this conversation as resolved.
Show resolved Hide resolved
service.set("name", "WMS")

version = ET.SubElement(service, "Version")
Expand Down
Loading