Skip to content

Commit 333c070

Browse files
authored
Merge branch 'OSGeo:main' into main
2 parents 4c9cd46 + cd30645 commit 333c070

File tree

19 files changed

+30
-29
lines changed

19 files changed

+30
-29
lines changed

.github/workflows/additional_checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
with:
3939
python-version: "3.14"
4040
- name: Install uv and restore its cache
41-
uses: astral-sh/setup-uv@2ddd2b9cb38ad8efd50337e8ab201519a34c9f24 # v7.1.1
41+
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
4242
with:
4343
# To not have the last commit JSON and release notes files affected on
4444
# releases, if copying the contents displayed in the CI logs.

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gui/wxpython/animation/dialogs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ def __init__(
16601660
self.tselect = Select(parent=self, type="strds")
16611661
iconTheme = UserSettings.Get(group="appearance", key="iconTheme", subkey="type")
16621662
bitmapPath = os.path.join(globalvar.ICONDIR, iconTheme, "layer-open.png")
1663-
if os.path.isfile(bitmapPath) and os.path.getsize(bitmapPath):
1663+
if os.path.isfile(bitmapPath) and Path(bitmapPath).stat().st_size:
16641664
bitmap = wx.Bitmap(name=bitmapPath)
16651665
else:
16661666
bitmap = wx.ArtProvider.GetBitmap(

gui/wxpython/core/toolboxes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ def getMenudataFile(userRootFile, newFile, fallback):
153153
)
154154
else:
155155
# if newer files -> generate new
156-
menudataTime = os.path.getmtime(menudataFile)
156+
menudataTime = Path(menudataFile).stat().st_mtime
157157
if _getUserToolboxesFile():
158-
if os.path.getmtime(_getUserToolboxesFile()) > menudataTime:
158+
if Path(_getUserToolboxesFile()).stat().st_mtime > menudataTime:
159159
_debug(
160160
2,
161161
(
@@ -165,7 +165,7 @@ def getMenudataFile(userRootFile, newFile, fallback):
165165
)
166166
generateNew = True
167167
if userRootFile:
168-
if os.path.getmtime(userRootFile) > menudataTime:
168+
if Path(userRootFile).stat().st_mtime > menudataTime:
169169
_debug(
170170
2,
171171
(

gui/wxpython/gui_core/toolbars.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import platform
2020
import os
2121
from itertools import starmap
22+
from pathlib import Path
2223

2324
import wx
2425
from wx.lib.agw import aui
@@ -281,7 +282,7 @@ def CreateSelectionButton(self, tooltip):
281282
Button must be custom (not toolbar tool) to set smaller width.
282283
"""
283284
arrowPath = os.path.join(IMGDIR, "small_down_arrow.png")
284-
if os.path.isfile(arrowPath) and os.path.getsize(arrowPath):
285+
if os.path.isfile(arrowPath) and Path(arrowPath).stat().st_size:
285286
bitmap = wx.Bitmap(name=arrowPath)
286287
else:
287288
bitmap = wx.ArtProvider.GetBitmap(

gui/wxpython/icons/icon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def GetBitmap(self, size=None):
8181
id=self.imagepath, client=wx.ART_TOOLBAR, size=size
8282
)
8383
elif self.type == "img":
84-
if os.path.isfile(self.imagepath) and os.path.getsize(self.imagepath):
84+
if os.path.isfile(self.imagepath) and Path(self.imagepath).stat().st_size:
8585
if size and len(size) == 2:
8686
image = wx.Image(name=self.imagepath)
8787
image.Rescale(size[0], size[1])

gui/wxpython/mapdisp/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import time
3333
import shutil
3434
import fileinput
35+
from pathlib import Path
3536

3637
from grass.script.utils import try_remove
3738
from grass.script import core as grass
@@ -616,7 +617,7 @@ def watcher(self):
616617

617618
# TODO: events
618619
try:
619-
currentCmdFileTime = os.path.getmtime(monFile["cmd"])
620+
currentCmdFileTime = Path(monFile["cmd"]).stat().st_mtime
620621
if currentCmdFileTime > self.cmdTimeStamp:
621622
self.timer.Stop()
622623
self.cmdTimeStamp = currentCmdFileTime

gui/wxpython/mapwin/buffered.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import time
2626
import math
2727
import sys
28+
from pathlib import Path
2829

2930
import wx
3031

@@ -799,7 +800,7 @@ def GetOverlay(self):
799800
if (
800801
overlay.mapfile is None
801802
or not os.path.isfile(overlay.mapfile)
802-
or (not os.path.getsize(overlay.mapfile))
803+
or (not Path(overlay.mapfile).stat().st_size)
803804
):
804805
continue
805806
img = utils.autoCropImageFromFile(overlay.mapfile)
@@ -824,7 +825,7 @@ def GetImage(self):
824825
if (
825826
self.Map.mapfile
826827
and os.path.isfile(self.Map.mapfile)
827-
and os.path.getsize(self.Map.mapfile)
828+
and Path(self.Map.mapfile).stat().st_size
828829
):
829830
img = wx.Image(self.Map.mapfile, wx.BITMAP_TYPE_ANY)
830831
else:

gui/wxpython/modules/colorrules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2051,7 +2051,7 @@ def GetImage(self):
20512051
if (
20522052
self.Map.mapfile
20532053
and os.path.isfile(self.Map.mapfile)
2054-
and os.path.getsize(self.Map.mapfile)
2054+
and Path(self.Map.mapfile).stat().st_size
20552055
):
20562056
img = wx.Image(self.Map.mapfile, wx.BITMAP_TYPE_ANY)
20572057
else:

gui/wxpython/modules/histogram.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import os
2121
import sys
22+
from pathlib import Path
2223

2324
import wx
2425

@@ -213,7 +214,7 @@ def GetImage(self):
213214
if (
214215
self.Map.mapfile
215216
and os.path.isfile(self.Map.mapfile)
216-
and os.path.getsize(self.Map.mapfile)
217+
and Path(self.Map.mapfile).stat().st_size
217218
):
218219
img = wx.Image(self.Map.mapfile, wx.BITMAP_TYPE_ANY)
219220
else:

0 commit comments

Comments
 (0)