Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion gui/wxpython/iscatt/core_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

def MergeArrays(merged_arr, overlay_arr, alpha):
if merged_arr.shape != overlay_arr.shape:
GException("MergeArrays: merged_arr.shape != overlay_arr.shape")
raise GException("MergeArrays: merged_arr.shape != overlay_arr.shape")

Check failure on line 85 in gui/wxpython/iscatt/core_c.py

View workflow job for this annotation

GitHub Actions / Python Code Quality Checks (ubuntu-24.04)

ruff (EM101)

gui/wxpython/iscatt/core_c.py:85:26: EM101 Exception must not use a string literal, assign to variable first help: Assign to variable; remove string literal

Check failure on line 85 in gui/wxpython/iscatt/core_c.py

View workflow job for this annotation

GitHub Actions / Python Code Quality Checks (ubuntu-24.04)

ruff (TRY003)

gui/wxpython/iscatt/core_c.py:85:15: TRY003 Avoid specifying long messages outside the exception class
Comment thread
echoix marked this conversation as resolved.
Outdated

c_uint8_p = POINTER(c_uint8)
merged_p = merged_arr.ctypes.data_as(c_uint8_p)
Expand Down
12 changes: 6 additions & 6 deletions gui/wxpython/iscatt/iscatt_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
)

if returncode < 0:
GException(_("Computing of scatter plots failed."))
raise GException(_("Computing of scatter plots failed."))

def CatRastUpdater(self):
return self.cat_rast_updater
Expand Down Expand Up @@ -274,7 +274,7 @@
region = self.an_data.GetRegion()
ret = UpdateCatRast(patch_rast, region, self.scatts_dt.GetCatRastCond(cat))
if ret < 0:
GException(_("Patching category raster conditions file failed."))
raise GException(_("Patching category raster conditions file failed."))
RunCommand("g.remove", flags="f", type="raster", name=patch_rast)

def _rasterize(self, grass_region, layer, cat, out_rast):
Expand All @@ -296,7 +296,7 @@
)

if ret != 0:
GException(_("v.build failed:\n%s") % msg)
raise GException(_("v.build failed:\n%s") % msg)

environs = os.environ.copy()
environs["GRASS_REGION"] = grass_region["GRASS_REGION"]
Expand All @@ -316,7 +316,7 @@
)

if ret != 0:
GException(_("v.to.rast failed:\n{messages}").format(messages=msg))
raise GException(_("v.to.rast failed:\n{messages}").format(messages=msg))

def _create_grass_region_env(self, bbox):
r = self.an_data.GetRegion()
Expand Down Expand Up @@ -383,15 +383,15 @@

self.region = GetRegion()
if self.region["rows"] * self.region["cols"] > MAX_NCELLS:
GException("too big region")
raise GException("too big region")

Check failure on line 386 in gui/wxpython/iscatt/iscatt_core.py

View workflow job for this annotation

GitHub Actions / Python Code Quality Checks (ubuntu-24.04)

ruff (EM101)

gui/wxpython/iscatt/iscatt_core.py:386:30: EM101 Exception must not use a string literal, assign to variable first help: Assign to variable; remove string literal

Check failure on line 386 in gui/wxpython/iscatt/iscatt_core.py

View workflow job for this annotation

GitHub Actions / Python Code Quality Checks (ubuntu-24.04)

ruff (TRY003)

gui/wxpython/iscatt/iscatt_core.py:386:19: TRY003 Avoid specifying long messages outside the exception class
Comment thread
echoix marked this conversation as resolved.
Outdated

self.bands_info = {}

for b in self.bands[:]:
i = GetRasterInfo(b)

if i is None:
GException("raster %s is not CELL type" % (b))
raise GException("raster %s is not CELL type" % (b))

self.bands_info[b] = i
# TODO check size of raster
Expand Down
Loading