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

wxGUI: Removed unused variables in vdigit/ #4728

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

arohanajit
Copy link
Contributor

@arohanajit arohanajit commented Nov 20, 2024

FIxed 'F841' by removing unused variables in vdigit\

@github-actions github-actions bot added GUI wxGUI related Python Related code is in Python labels Nov 20, 2024
gui/wxpython/vdigit/mapwindow.py Outdated Show resolved Hide resolved
Arohan Ajit added 2 commits November 25, 2024 11:50
@@ -712,7 +712,7 @@ def SelectLineByPoint(self, point, ltype=None, poMapInfo=None):
pz = c_double()
if not self._validLine(lineNearest):
return {"line": -1, "point": None}
ftype = Vect_read_line(poMapInfo, self.poPoints, self.poCats, lineNearest)
_ = Vect_read_line(poMapInfo, self.poPoints, self.poCats, lineNearest)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there might be an issue here, as the gettext translation function _() is using the underscore name, and here it is assigning something else. I would expect that everything calling a translation after this line to be broken (at least in that file).

@@ -856,7 +856,7 @@ def GetSelectedVertex(self, pos):

if not self._validLine(line):
return -1
ftype = Vect_read_line(self.poMapInfo, self.poPoints, self.poCats, line)
_ = Vect_read_line(poMapInfo, self.poPoints, self.poCats, lineNearest)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here, I suspect that assigning to underscore would cause problems. (Unless you can teach me why it works, I'm open to learn if I'm wrong)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI wxGUI related Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants