Skip to content

Commit def6697

Browse files
authored
wxGUI: Fixed ruff error PTH208 in datacatalog/ (OSGeo#5046)
1 parent c5d87f6 commit def6697

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

gui/wxpython/datacatalog/catalog.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"""
1818

1919
import wx
20-
import os
2120

2221
from pathlib import Path
2322

@@ -212,7 +211,7 @@ def OnAddGrassDB(self, event):
212211
grassdb_node = self.tree.InsertGrassDb(name=grassdatabase)
213212

214213
# Offer to create a new location
215-
if grassdb_node and not os.listdir(grassdatabase):
214+
if grassdb_node and not any(Path(grassdatabase).iterdir()):
216215
message = _(
217216
"Do you want to create a new project (also known as location)?"
218217
)

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ ignore = [
268268
# Other ignores:
269269
"**.py" = ["PYI066"]
270270
"*/testsuite/**.py" = ["PT009", "PT027"]
271-
"gui/wxpython/datacatalog/catalog.py" = ["PTH208"]
272271
"gui/wxpython/dbmgr/base.py" = ["SIM115"]
273272
"gui/wxpython/gcp/manager.py" = ["PTH208"]
274273
"gui/wxpython/gmodeler/panels.py" = ["SIM115"]

0 commit comments

Comments
 (0)