From 6e90c19f65c9a0e822c671d8e2899e44a5dd05a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sun, 13 Apr 2025 21:31:45 +0000 Subject: [PATCH] style: Fix raise-without-from-inside-except (B904) for pygrass Module Ruff rule: https://docs.astral.sh/ruff/rules/raise-without-from-inside-except/ --- python/grass/pygrass/modules/interface/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/grass/pygrass/modules/interface/module.py b/python/grass/pygrass/modules/interface/module.py index 723ea5b5224..6690f38339c 100644 --- a/python/grass/pygrass/modules/interface/module.py +++ b/python/grass/pygrass/modules/interface/module.py @@ -555,7 +555,7 @@ def __init__(self, cmd, *args, **kargs): except OSError as e: print("OSError error({0}): {1}".format(e.errno, e.strerror)) str_err = "Error running: `%s --interface-description`." - raise GrassError(str_err % self.name) + raise GrassError(str_err % self.name) from e # get the xml of the module self.xml = get_cmd_xml.communicate()[0] # transform and parse the xml into an Element class: