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

build(deps-dev): bump ruff from 0.7.4 to 0.8.0 #1016

Merged
merged 2 commits into from
Nov 28, 2024
Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 25, 2024

Bumps ruff from 0.7.4 to 0.8.0.

Release notes

Sourced from ruff's releases.

0.8.0

Release Notes

Check out the blog post for a migration guide and overview of the changes!

Breaking changes

See also, the "Remapped rules" section which may result in disabled rules.

  • Default to Python 3.9

    Ruff now defaults to Python 3.9 instead of 3.8 if no explicit Python version is configured using ruff.target-version or project.requires-python (#13896)

  • Changed location of pydoclint diagnostics

    pydoclint diagnostics now point to the first-line of the problematic docstring. Previously, this was not the case.

    If you've opted into these preview rules but have them suppressed using noqa comments in some places, this change may mean that you need to move the noqa suppression comments. Most users should be unaffected by this change.

  • Use XDG (i.e. ~/.local/bin) instead of the Cargo home directory in the standalone installer

    Previously, Ruff's installer used $CARGO_HOME or ~/.cargo/bin for its target install directory. Now, Ruff will be installed into $XDG_BIN_HOME, $XDG_DATA_HOME/../bin, or ~/.local/bin (in that order).

    This change is only relevant to users of the standalone Ruff installer (using the shell or PowerShell script). If you installed Ruff using uv or pip, you should be unaffected.

  • Changes to the line width calculation

    Ruff now uses a new version of the unicode-width Rust crate to calculate the line width. In very rare cases, this may lead to lines containing Unicode characters being reformatted, or being considered too long when they were not before (E501).

Removed Rules

The following deprecated rules have been removed:

Remapped rules

The following rules have been remapped to new rule codes:

Stabilization

... (truncated)

Changelog

Sourced from ruff's changelog.

0.8.0

Check out the blog post for a migration guide and overview of the changes!

Breaking changes

See also, the "Remapped rules" section which may result in disabled rules.

  • Default to Python 3.9

    Ruff now defaults to Python 3.9 instead of 3.8 if no explicit Python version is configured using ruff.target-version or project.requires-python (#13896)

  • Changed location of pydoclint diagnostics

    pydoclint diagnostics now point to the first-line of the problematic docstring. Previously, this was not the case.

    If you've opted into these preview rules but have them suppressed using noqa comments in some places, this change may mean that you need to move the noqa suppression comments. Most users should be unaffected by this change.

  • Use XDG (i.e. ~/.local/bin) instead of the Cargo home directory in the standalone installer

    Previously, Ruff's installer used $CARGO_HOME or ~/.cargo/bin for its target install directory. Now, Ruff will be installed into $XDG_BIN_HOME, $XDG_DATA_HOME/../bin, or ~/.local/bin (in that order).

    This change is only relevant to users of the standalone Ruff installer (using the shell or PowerShell script). If you installed Ruff using uv or pip, you should be unaffected.

  • Changes to the line width calculation

    Ruff now uses a new version of the unicode-width Rust crate to calculate the line width. In very rare cases, this may lead to lines containing Unicode characters being reformatted, or being considered too long when they were not before (E501).

Removed Rules

The following deprecated rules have been removed:

Remapped rules

The following rules have been remapped to new rule codes:

Stabilization

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Nov 25, 2024
@qkaiser
Copy link
Contributor

qkaiser commented Nov 26, 2024

Good stuff being caught on by ruff:

warning: The `ignore-init-module-imports` option is deprecated and will be removed in a future release. Ruff's handling of imports in `__init__.py` files has been improved (in preview) and unused imports will always be flagged.
unblob/handlers/__init__.py:2:81: A004 Import `zip` is shadowing a Python builtin
  |
1 | from ..models import DirectoryHandlers, Handlers
2 | from .archive import ar, arc, arj, cab, cpio, dmg, rar, sevenzip, stuffit, tar, zip
  |                                                                                 ^^^ A004
3 | from .archive.autel import ecc
4 | from .archive.dlink import encrpted_img, shrs
  |

unblob/handlers/filesystem/yaffs.py:411:17: UP031 Use format specifiers instead of percent format
    |
409 |         if config.spare_size not in VALID_SPARE_SIZES:
410 |             raise InvalidInputFormat(
411 |                 "Auto-detection failed: Detected an unlikely spare size: %d"
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP031
412 |                 % config.spare_size
413 |             )
    |
    = help: Replace with format specifiers


Fixed 1 error:
- unblob/testing.py:
    1 × RUF100 (unused-noqa)

Found 3 errors (1 fixed, 2 remaining).

Format python (ruff).....................................................Passed
Format Nix (nixfmt)......................................................Passed
Check vulture............................................................Passed
Check Github actions.....................................................Passed
Check Github workflows...................................................Passed
pre-commit hook(s) made changes.
If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`.
To run `pre-commit` as part of git workflow, use `pre-commit install`.
All changes made by hooks:
diff --git a/unblob/testing.py b/unblob/testing.py
index 82c8312..86030c5 100644
--- a/unblob/testing.py
+++ b/unblob/testing.py
@@ -19,7 +19,7 @@ from unblob.report import ExtractCommandFailedReport
 
 
 @pytest.fixture(scope="session", autouse=True)
-def configure_logging(tmp_path_factory):  # noqa: PT004
+def configure_logging(tmp_path_factory):
     extract_root = tmp_path_factory.mktemp("extract")
     log_path = tmp_path_factory.mktemp("logs") / "unblob.log"
     configure_logger(verbosity_level=3, extract_root=extract_root, log_path=log_path)
Error: Process completed with exit code 1.

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.4 to 0.8.0.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.7.4...0.8.0)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Copy link
Contributor

@vlaci vlaci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am on the edge about the zip issue, but I leave it up to you.

unblob/handlers/__init__.py Outdated Show resolved Hide resolved
@vlaci vlaci merged commit f7b5de5 into main Nov 28, 2024
15 checks passed
@vlaci vlaci deleted the dependabot/pip/ruff-0.8.0 branch November 28, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants