Skip to content

Commit

Permalink
wxGUI: Fixed ruff error PTH208 in datacatalog/ (#5046)
Browse files Browse the repository at this point in the history
  • Loading branch information
arohanajit authored Feb 5, 2025
1 parent c5d87f6 commit def6697
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions gui/wxpython/datacatalog/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"""

import wx
import os

from pathlib import Path

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

# Offer to create a new location
if grassdb_node and not os.listdir(grassdatabase):
if grassdb_node and not any(Path(grassdatabase).iterdir()):
message = _(
"Do you want to create a new project (also known as location)?"
)
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ ignore = [
# Other ignores:
"**.py" = ["PYI066"]
"*/testsuite/**.py" = ["PT009", "PT027"]
"gui/wxpython/datacatalog/catalog.py" = ["PTH208"]
"gui/wxpython/dbmgr/base.py" = ["SIM115"]
"gui/wxpython/gcp/manager.py" = ["PTH208"]
"gui/wxpython/gmodeler/panels.py" = ["SIM115"]
Expand Down

0 comments on commit def6697

Please sign in to comment.