diff --git a/.github/workflows/python-code-quality.yml b/.github/workflows/python-code-quality.yml index 385ad6b9dd..9febdd990e 100644 --- a/.github/workflows/python-code-quality.yml +++ b/.github/workflows/python-code-quality.yml @@ -36,7 +36,7 @@ jobs: # renovate: datasource=pypi depName=bandit BANDIT_VERSION: "1.7.10" # renovate: datasource=pypi depName=ruff - RUFF_VERSION: "0.6.7" + RUFF_VERSION: "0.6.8" runs-on: ${{ matrix.os }} permissions: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 74423979b2..b7a517fba3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: ) - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.6.7 + rev: v0.6.8 hooks: # Run the linter. - id: ruff diff --git a/gui/wxpython/gui_core/gselect.py b/gui/wxpython/gui_core/gselect.py index cec6963a52..04c3a5f136 100644 --- a/gui/wxpython/gui_core/gselect.py +++ b/gui/wxpython/gui_core/gselect.py @@ -414,7 +414,7 @@ def SetData(self, **kargs): self.multiple = kargs["multiple"] if "onPopup" in kargs: self.onPopup = kargs["onPopup"] - if kargs.get("layerTree", None): + if kargs.get("layerTree"): self.filterItems = [] # reset ltype = kargs["type"] for layer in kargs["layerTree"].GetVisibleLayers(skipDigitized=True): diff --git a/scripts/r.in.wms/wms_drv.py b/scripts/r.in.wms/wms_drv.py index 186157ad6d..dd666573cf 100644 --- a/scripts/r.in.wms/wms_drv.py +++ b/scripts/r.in.wms/wms_drv.py @@ -736,9 +736,7 @@ def _findTileMats(self, tile_mats, region, bbox): best_diff = best_scale_den - scale_den mat_diff = mat_scale_den - scale_den - if (best_diff < mat_diff and mat_diff < 0) or ( - best_diff > mat_diff and best_diff > 0 - ): + if (best_diff < mat_diff < 0) or (best_diff > mat_diff and best_diff > 0): best_t_mat = t_mat best_scale_den = mat_scale_den @@ -1020,9 +1018,7 @@ def _parseTilePattern(self, group_t_patts, bbox, region): best_diff = best_res - res[comp_res] tile_diff = t_res[comp_res] - res[comp_res] - if (best_diff < tile_diff and tile_diff < 0) or ( - best_diff > tile_diff and best_diff > 0 - ): + if (best_diff < tile_diff < 0) or (best_diff > tile_diff and best_diff > 0): best_res = t_res[comp_res] best_patt = pattern