Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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 .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# renovate: datasource=pypi depName=bandit
BANDIT_VERSION: "1.8.6"
# renovate: datasource=pypi depName=ruff
RUFF_VERSION: "0.13.2"
RUFF_VERSION: "0.14.0"

runs-on: ${{ matrix.os }}
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ repos:
)
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.13.2
rev: v0.14.0
hooks:
# Run the linter.
- id: ruff-check
Expand Down
1 change: 0 additions & 1 deletion gui/wxpython/gui_core/infobar.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import sys
import wx
import wx.aui

try:
import wx.lib.agw.infobar as IB
Expand Down
2 changes: 0 additions & 2 deletions gui/wxpython/gui_core/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@
from wx.lib.wordwrap import wordwrap

if wxPythonPhoenix:
import wx.adv
from wx.adv import OwnerDrawnComboBox
else:
import wx.combo
from wx.combo import OwnerDrawnComboBox
try:
import wx.lib.agw.flatnotebook as FN
Expand Down
1 change: 0 additions & 1 deletion gui/wxpython/lmgr/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from pathlib import Path

import wx
import wx.aui

from core.settings import UserSettings
from core.gcmd import RunCommand, GError, GMessage
Expand Down
1 change: 0 additions & 1 deletion gui/wxpython/wxgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
# we get annoying "Debug: Adding duplicate image handler for 'Windows bitmap file'"
# during start up, remove when not needed
import wx.adv
import wx.html

try:
import wx.lib.agw.advancedsplash as SC
Expand Down
23 changes: 14 additions & 9 deletions python/grass/temporal/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@

from __future__ import annotations

# import traceback
import atexit
import os
import sqlite3
from datetime import datetime
from importlib.util import find_spec
from pathlib import Path

import grass.script as gs
Expand All @@ -42,22 +45,24 @@

from .c_libraries_interface import CLibrariesInterface

# Import all supported database backends
# Ignore import errors since they are checked later

import sqlite3
# Import all supported database backends (sqlite3 imported above)
# Ignore import errors since they are checked later

db_errors: tuple[type[sqlite3.Error], type[psycopg2.Error]] | tuple[type[sqlite3.Error]]
# Postgresql is optional, existence is checked when needed
try:
import psycopg2
if find_spec("psycopg2") is not None and find_spec("psycopg2.extras") is not None:
# Following explanations on how importing submodules work
# from ruff's v0.13.3 new F401 handling https://github.com/astral-sh/ruff/pull/20200
# importing "psycopg2.extras" actually makes an "import psycopg2",
# making the members of the form `psycopg2.*` available, and then also imports the
# extras and makes available the members of the form `psycopg2.extras.*`.
import psycopg2.extras

db_errors = (sqlite3.Error, psycopg2.Error)
except ImportError:
else:
db_errors = (sqlite3.Error,)

import atexit
from datetime import datetime

###############################################################################

Expand Down
Loading