Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI(deps): Update ruff to v0.7.3 #4672

Merged
merged 5 commits into from
Nov 11, 2024
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 @@
# renovate: datasource=pypi depName=bandit
BANDIT_VERSION: "1.7.10"
# renovate: datasource=pypi depName=ruff
RUFF_VERSION: "0.7.2"
RUFF_VERSION: "0.7.3"

runs-on: ${{ matrix.os }}
permissions:
Expand Down Expand Up @@ -146,7 +146,7 @@
- name: Set number of cores for compilation
run: |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV

Check warning on line 149 in .github/workflows/python-code-quality.yml

View workflow job for this annotation

GitHub Actions / Python Code Quality Checks (ubuntu-22.04)

Temporarily downgraded pytest-pylint and pytest to allow merging other PRs. The errors reported with a newer version seem legitimite and should be fixed (2023-10-18, see https://github.com/OSGeo/grass/pull/3205) (2024-01-28, see https://github.com/OSGeo/grass/issues/3380)
- uses: rui314/setup-mold@b015f7e3f2938ad3a5ed6e5111a8c6c7c1d6db6e # v1
- name: Build
run: .github/workflows/build_${{ matrix.os }}.sh $HOME/install
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.7.2
rev: v0.7.3
hooks:
# Run the linter.
- id: ruff
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ ignore = [
# "A005", # builtin-module-shadowing
# "PLW0108", # unnecessary-lambda
# Ignore `E402` (import violations) in all `__init__.py` files
"**.py" = ["PYI066"]
"*/testsuite/**.py" = ["PT009", "PT027"]
"__init__.py" = ["E402"]
"display/d.mon/render_cmd.py" = ["SIM115"]
Expand Down Expand Up @@ -317,6 +318,7 @@ ignore = [
"python/grass/pygrass/modules/grid/testsuite/test_*_modules_grid_doctests.py" = ["F401"]
"python/grass/pygrass/modules/interface/env.py" = ["SIM115"]
"python/grass/pygrass/modules/testsuite/test_pygrass_modules_doctests.py" = ["F401"]
"python/grass/pygrass/raster/category.py" = ["FURB189"]
"python/grass/pygrass/raster/segment.py" = ["SIM115"]
"python/grass/pygrass/tests/*.py" = ["SIM115"]
"python/grass/pygrass/vector/geometry.py" = ["PYI024"]
Expand All @@ -326,7 +328,7 @@ ignore = [
"python/grass/script/core.py" = ["SIM115"]
"python/grass/script/db.py" = ["SIM115"]
"python/grass/script/raster.py" = ["SIM115"]
"python/grass/script/utils.py" = ["SIM115"]
"python/grass/script/utils.py" = ["FURB189", "SIM115"]
"python/grass/temporal/aggregation.py" = ["SIM115"]
"python/grass/temporal/register.py" = ["SIM115"]
"python/grass/temporal/stds_export.py" = ["SIM115"]
Expand Down
2 changes: 1 addition & 1 deletion scripts/d.correlate/d.correlate.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def main():

os.environ["GRASS_RENDER_FILE_READ"] = "TRUE"

colors = "red black blue green gray violet".split()
colors = ["red", "black", "blue", "green", "gray", "violet"]
line = 2
iloop = 0
jloop = 0
Expand Down
3 changes: 2 additions & 1 deletion scripts/db.dropcolumn/db.dropcolumn.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def main():
driver=driver,
).split(".")[0:2]

if [int(i) for i in sqlite3_version] >= [int(i) for i in "3.35".split(".")]:
# sqlite version 3.35 compared here
if [int(i) for i in sqlite3_version] >= [int(i) for i in ["3", "35"]]:
sql = "ALTER TABLE %s DROP COLUMN %s" % (table, column)
if column == "cat":
sql = "DROP INDEX %s_%s; %s" % (table, column, sql)
Expand Down
Loading