Skip to content

Commit

Permalink
CI(deps): Update ruff to v0.6.8 (#4394)
Browse files Browse the repository at this point in the history
* CI(deps): Update ruff to v0.6.8

* style: Use `kargs.get("layerTree")` instead of `kargs.get("layerTree", None)` (SIM910)

* style: Simplify chained boolean comparison

* Apply black formatting

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Edouard Choinière <[email protected]>
  • Loading branch information
renovate[bot] and echoix authored Sep 26, 2024
1 parent c502c1c commit e4c87ec
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
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.7.10"
# renovate: datasource=pypi depName=ruff
RUFF_VERSION: "0.6.7"
RUFF_VERSION: "0.6.8"

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 @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/gui_core/gselect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
8 changes: 2 additions & 6 deletions scripts/r.in.wms/wms_drv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit e4c87ec

Please sign in to comment.