From b2e2571e195ce5b4d26addc736ed6586ddb77270 Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Wed, 13 Nov 2024 00:25:02 -0500 Subject: [PATCH] wxGUI: Removed PEP8 errors from rlisetup/ (#4693) removed flake8 --- .flake8 | 2 -- gui/wxpython/rlisetup/sampling_frame.py | 1 - gui/wxpython/rlisetup/wizard.py | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.flake8 b/.flake8 index 84cc7d7e353..8026eb7073e 100644 --- a/.flake8 +++ b/.flake8 @@ -48,8 +48,6 @@ per-file-ignores = gui/wxpython/tools/build_modules_xml.py: E722 gui/wxpython/web_services/cap_interface.py: E501 gui/wxpython/web_services/widgets.py: F841, E402 - gui/wxpython/rlisetup/sampling_frame.py: F841 - gui/wxpython/rlisetup/wizard.py: E722 # Generated file gui/wxpython/menustrings.py: E501 # F821 undefined name 'cmp' diff --git a/gui/wxpython/rlisetup/sampling_frame.py b/gui/wxpython/rlisetup/sampling_frame.py index a379ef8c09c..7e410d6f182 100644 --- a/gui/wxpython/rlisetup/sampling_frame.py +++ b/gui/wxpython/rlisetup/sampling_frame.py @@ -315,7 +315,6 @@ def _onToolChanged(self): def _radiusDrawn(self, x, y): """When drawing finished, get region values""" mouse = self.mapWindow.mouse - item = self._registeredGraphics.GetItem(0) p1 = mouse["begin"] p2 = mouse["end"] dist, (north, east) = self.mapWindow.Distance(p1, p2, False) diff --git a/gui/wxpython/rlisetup/wizard.py b/gui/wxpython/rlisetup/wizard.py index 6fb7988159d..ba2a5b61f78 100644 --- a/gui/wxpython/rlisetup/wizard.py +++ b/gui/wxpython/rlisetup/wizard.py @@ -687,7 +687,7 @@ def OnVector(self, event): def OnLayer(self, event): try: self.vectorlayer = self.vectlayer.GetValue() - except: + except AttributeError: self.vectorlayer = None next = wx.FindWindowById(wx.ID_FORWARD) next.Enable(self.CheckInput())