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.6.5 #4315

Merged
merged 3 commits into from
Sep 16, 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.9"
# renovate: datasource=pypi depName=ruff
RUFF_VERSION: "0.6.4"
RUFF_VERSION: "0.6.5"

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@0bf4f07ef9048ec62a45f9dbf2f098afa49695f0 # 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.6.4
rev: v0.6.5
hooks:
# Run the linter.
- id: ruff
Expand Down
3 changes: 1 addition & 2 deletions man/parser_standard_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ def split_opt_line(line):
index = line.index("=")
key = line[:index].strip()
default = line[index + 1 :].strip()
if default.startswith("_("):
default = default[2:]
default = default.removeprefix("_(")
return key, default

def parse_glines(glines):
Expand Down
6 changes: 2 additions & 4 deletions python/grass/gunittest/reporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ def get_svn_revision():
rc = p.poll()
if not rc:
stdout = stdout.strip()
if stdout.endswith("M"):
stdout = stdout[:-1]
stdout = stdout.removesuffix("M")
if ":" in stdout:
# the first one is the one of source code
stdout = stdout.split(":")[0]
Expand Down Expand Up @@ -211,8 +210,7 @@ def get_svn_info():
if relurl is not None:
relurl = relurl.text
# relative path has ^ at the beginning in SVN version 1.8.8
if relurl.startswith("^"):
relurl = relurl[1:]
relurl = relurl.removeprefix("^")
else:
# SVN version 1.8.8 supports relative-url but older do not
# so, get relative part from absolute URL
Expand Down
4 changes: 1 addition & 3 deletions utils/generate_release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ def print_category(category, changes, file=None):
# Relies on author being specified as username.
if " " in author:
author = author.split(" ", maxsplit=1)[0]
if author.startswith("@"):
# We expect that to be always the case, but we test anyway.
author = author[1:]
author = author.removeprefix("@")
if author in known_bot_names or author.endswith("[bot]"):
hidden.append(item)
elif len(visible) > max_section_length:
Expand Down
Loading