diff --git a/gui/wxpython/animation/anim.py b/gui/wxpython/animation/anim.py index 591bbff151c..6496f3b4ca4 100644 --- a/gui/wxpython/animation/anim.py +++ b/gui/wxpython/animation/anim.py @@ -93,11 +93,11 @@ def SetCallbackOrientationChanged(self, callback): def Start(self): if not self.IsActive(): - return + pass def Pause(self, paused): if not self.IsActive(): - return + pass def Stop(self): if not self.IsActive(): diff --git a/gui/wxpython/animation/controller.py b/gui/wxpython/animation/controller.py index 1a8cb1fe9cc..808e9b20ef4 100644 --- a/gui/wxpython/animation/controller.py +++ b/gui/wxpython/animation/controller.py @@ -627,7 +627,6 @@ def export_avi_callback(event): del self.busy if error: GError(parent=self.frame, message=error) - return if exportInfo["method"] == "sequence": filename = os.path.join( diff --git a/gui/wxpython/photo2image/ip2i_manager.py b/gui/wxpython/photo2image/ip2i_manager.py index 26bd3ed7733..1adb2abcc8c 100644 --- a/gui/wxpython/photo2image/ip2i_manager.py +++ b/gui/wxpython/photo2image/ip2i_manager.py @@ -1145,7 +1145,7 @@ def OnGeorectDone(self, **kargs): """Print final message""" global maptype if maptype == "raster": - return + pass def OnSettings(self, event): """GCP Manager settings""" diff --git a/gui/wxpython/rdigit/dialogs.py b/gui/wxpython/rdigit/dialogs.py index fa9f57b8253..d0aa967a909 100644 --- a/gui/wxpython/rdigit/dialogs.py +++ b/gui/wxpython/rdigit/dialogs.py @@ -91,7 +91,7 @@ def OnBackgroundMap(self, event): ret = grast.raster_info(value) self._typeChoice.SetStringSelection(ret["datatype"]) except CalledModuleError: - return + pass def OnOK(self, event): mapName = self.GetMapName() diff --git a/gui/wxpython/rdigit/toolbars.py b/gui/wxpython/rdigit/toolbars.py index d3d9aed5eb9..ba7e8e7e6bc 100644 --- a/gui/wxpython/rdigit/toolbars.py +++ b/gui/wxpython/rdigit/toolbars.py @@ -207,7 +207,7 @@ def _cellValueChanged(self): value = float(value) self._controller.SetCellValue(value) except ValueError: - return + pass def _widthValueChanged(self): value = self._widthValue.GetValue() @@ -216,7 +216,6 @@ def _widthValueChanged(self): self._controller.SetWidthValue(value) except ValueError: self._controller.SetWidthValue(0) - return def _changeDrawColor(self): color = self._color.GetColour() diff --git a/gui/wxpython/rlisetup/wizard.py b/gui/wxpython/rlisetup/wizard.py index 9ce716b47ba..a05fcd90971 100644 --- a/gui/wxpython/rlisetup/wizard.py +++ b/gui/wxpython/rlisetup/wizard.py @@ -756,7 +756,6 @@ def OnExitPage(self, event: WizardEvent | None = None) -> None: elif self.region == "draw": self.SetNext(self.parent.drawsampleframepage) self.parent.samplingareapage.SetPrev(self.parent.drawsampleframepage) - return class KeyboardPage(TitledPage): diff --git a/pyproject.toml b/pyproject.toml index 3672737bdc9..98bd80243f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -635,7 +635,6 @@ disable = [ "R1704", # Redefining argument with the local name %r (redefined-argument-from-local) "R1705", # Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) "R1710", # Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements) - "R1711", # Useless return at end of function or method (useless-return) "R1712", # Consider using tuple unpacking for swapping variables (consider-swap-variables) "R1713", # Consider using str.join(sequence) for concatenating strings from an iterable (consider-using-join) "R1714", # Consider merging these comparisons with 'in' by using '%s %sin (%s)'. Use a set instead if elements are hashable. (consider-using-in) diff --git a/python/grass/pygrass/vector/geometry.py b/python/grass/pygrass/vector/geometry.py index a5efddb94a6..04d57d7a204 100644 --- a/python/grass/pygrass/vector/geometry.py +++ b/python/grass/pygrass/vector/geometry.py @@ -1134,8 +1134,6 @@ def from_wkt(self, wkt): self.reset() for coord in match.groups()[0].strip().split(","): self.append(tuple(float(e) for e in coord.split(" "))) - else: - return None def buffer( self,