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

⬆️ πŸ› οΈ(deps): update dependency ruff to ^0.9.0 #555

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 9, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
ruff (source, changelog) ^0.8.0 -> ^0.9.0 age adoption passing confidence

Release Notes

astral-sh/ruff (ruff)

v0.9.0

Compare Source

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

Breaking changes

Ruff now formats your code according to the 2025 style guide. As a result, your code might now get formatted differently. See the formatter section for a detailed list of changes.

This release doesn’t remove or remap any existing stable rules.

Stabilization

The following rules have been stabilized and are no longer in preview:

The following behaviors have been stabilized:

The following fixes or improvements to fixes have been stabilized:

Formatter

This release introduces the new 2025 stable style (#​13371), stabilizing the following changes:

  • Format expressions in f-string elements (#​7594)
  • Alternate quotes for strings inside f-strings (#​13860)
  • Preserve the casing of hex codes in f-string debug expressions (#​14766)
  • Choose the quote style for each string literal in an implicitly concatenated f-string rather than for the entire string (#​13539)
  • Automatically join an implicitly concatenated string into a single string literal if it fits on a single line (#​9457)
  • Remove the ISC001 incompatibility warning (#​15123)
  • Prefer parenthesizing the assert message over breaking the assertion expression (#​9457)
  • Automatically parenthesize over-long if guards in match case clauses (#​13513)
  • More consistent formatting for match case patterns (#​6933)
  • Avoid unnecessary parentheses around return type annotations (#​13381)
  • Keep the opening parentheses on the same line as the if keyword for comprehensions where the condition has a leading comment (#​12282)
  • More consistent formatting for with statements with a single context manager for Python 3.8 or older (#​10276)
  • Correctly calculate the line-width for code blocks in docstrings when using max-doc-code-line-length = "dynamic" (#​13523)
Preview features
  • [flake8-bugbear] Implement class-as-data-structure (B903) (#​9601)
  • [flake8-type-checking] Apply quoted-type-alias more eagerly in TYPE_CHECKING blocks and ignore it in stubs (TC008) (#​15180)
  • [pylint] Ignore eq-without-hash in stub files (PLW1641) (#​15310)
  • [pyupgrade] Split UP007 into two individual rules: UP007 for Union and UP045 for Optional (UP007, UP045) (#​15313)
  • [ruff] New rule that detects classes that are both an enum and a dataclass (RUF049) (#​15299)
  • [ruff] Recode RUF025 to RUF037 (RUF037) (#​15258)
Rule changes
Server
  • Improve the observability by removing the need for the "trace" value to turn on or off logging. The server logging is solely controlled using the logLevel server setting
    which defaults to info. This addresses the issue where users were notified about an error and told to consult the log, but it didn’t contain any messages. (#​15232)
  • Ignore diagnostics from other sources for code action requests (#​15373)
CLI
  • Improve the error message for --config key=value when the key is for a table and it’s a simple value
Bug fixes
  • [eradicate] Ignore metadata blocks directly followed by normal blocks (ERA001) (#​15330)
  • [flake8-django] Recognize other magic methods (DJ012) (#​15365)
  • [pycodestyle] Avoid false positives related to type aliases (E252) (#​15356)
  • [pydocstyle] Avoid treating newline-separated sections as sub-sections (D405) (#​15311)
  • [pyflakes] Remove call when removing final argument from format (F523) (#​15309)
  • [refurb] Mark fix as unsafe when the right-hand side is a string (FURB171) (#​15273)
  • [ruff] Treat ) as a regex metacharacter (RUF043, RUF055) (#​15318)
  • [ruff] Parenthesize the int-call argument when removing the int call would change semantics (RUF046) (#​15277)

Configuration

πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Summary by Sourcery

Build:

  • Update the ruff dependency in pyproject.toml to ^0.9.0.

@renovate renovate bot added the dependencies label Jan 9, 2025
Copy link

sourcery-ai bot commented Jan 9, 2025

Reviewer's Guide by Sourcery

This pull request updates the ruff dependency from ^0.8.0 to ^0.9.0. This update introduces the new 2025 stable style and includes several breaking changes, stabilizations, preview features, rule changes, and bug fixes. The update also includes changes to the formatter, server, and CLI.

State diagram for Ruff version transition

stateDiagram-v2
    [*] --> Ruff_0.8.0
    Ruff_0.8.0 --> Ruff_0.9.0

    state Ruff_0.9.0 {
        [*] --> StableRules
        StableRules --> Formatter
        Formatter --> PreviewFeatures

        state StableRules {
            stdlib_module_shadowing
            builtin_lambda_argument
            slice_operations
            boolean_chained
        }

        state Formatter {
            style_2025
            fstring_formatting
            match_case_patterns
        }

        state PreviewFeatures {
            new_bugbear_rules
            type_checking_updates
            enum_dataclass_detection
        }
    }
Loading

File-Level Changes

Change Details Files
Updated the ruff dependency
  • Changed the ruff version from ^0.8.0 to ^0.9.0 in the pyproject.toml file under tool.poetry.group.dev.dependencies section.
pyproject.toml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We have skipped reviewing this pull request. Here's why:

  • It seems to have been created by a bot (hey, renovate[bot]!). We assume it knows what it's doing!
  • We don't review packaging changes - Let us know if you'd like us to change this.

Copy link

@llamapreview llamapreview bot left a comment

Choose a reason for hiding this comment

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

Auto Pull Request Review from LlamaPReview

1. Overview

1.1 Core Changes

  • Primary purpose and scope: This PR updates the ruff dependency from ^0.8.0 to ^0.9.0 in the pyproject.toml file.
  • Key components modified: pyproject.toml
  • Cross-component impacts: None
  • Business value alignment: Ensures the project benefits from the latest features, bug fixes, and improvements in the ruff linter.

2. Deep Technical Analysis

2.1 Code Logic Analysis

  • [pyproject.toml] - [tool.poetry.group.dev.dependencies]
    • Submitted PR Code:
    [tool.poetry.group.dev.dependencies]
    python-semantic-release = ">=8.0.8"
    -ruff = "^0.8.0"
    +ruff = "^0.9.0"
    pre-commit = "^4.0.0"
  • Analysis:
    • Current logic and potential issues: The PR updates the ruff dependency to the latest version. This change is straightforward and should not introduce any direct issues.
    • Edge cases and error handling: There are no edge cases or error handling considerations specific to this change.
    • Cross-component impact : None
    • Business logic considerations : None
  • LlamaPReview Suggested Improvements: None
  • Improvement rationale : None

2.2 Implementation Quality

  • Code Structure:

    • Organization and modularity: The change is well-organized and modular, affecting only the dependency version in the pyproject.toml file.
    • Design pattern adherence: N/A
    • Reusability aspects: N/A
    • Maintainability factors: The change is simple and easy to maintain.
  • Error Handling:

    • Exception scenarios coverage: N/A
    • Recovery mechanisms: N/A
    • Logging and monitoring: N/A
    • User experience impact: N/A
  • Performance Considerations:

    • Resource utilization: Updating the dependency version does not directly impact resource utilization.
    • Scalability aspects: N/A
    • Bottleneck analysis: N/A
    • Optimization opportunities: N/A

3. Risk Assessment

3.1 Critical Issues

πŸ”΄ P0 (Must Fix):

  • Issue: None
  • Impact: None
  • Resolution: None

3.2 Important Improvements

🟑 P1 (Should Fix):

  • Issue: None
  • Current Impact: None
  • Suggested Solution: None

3.3 Minor Suggestions

🟒 P2 (Consider):

  • Area: None
  • Improvement Opportunity: None

4. Requirements Analysis

4.1 Functional Coverage

  • Requirements mapping:
    • Implemented features: Update of ruff dependency.
    • Missing elements: None
    • Edge cases handling: N/A
  • Business Logic:
    • Use case coverage: N/A
    • Business rule implementation: N/A
    • Data flow correctness: N/A

4.2 Non-functional Aspects

  • Performance metrics: N/A
  • Security considerations: N/A
  • Scalability factors: N/A
  • Maintainability aspects: The change is simple and easy to maintain.

5. Testing Strategy

  • Test Coverage:
    • Unit test requirements: N/A
    • Integration test scenarios: N/A
    • Edge case validation: N/A
  • Quality Metrics:
    • Current coverage: N/A
    • Critical paths: N/A
    • Performance benchmarks: N/A

6. Final Assessment

6.1 Key Action Items

  1. Critical Changes (P0):
    None

  2. Important Improvements (P1):
    None

  3. Suggested Enhancements (P2):
    None

6.2 Overall Evaluation

  • Technical assessment: The PR updates the ruff dependency to the latest version, which is a routine maintenance task.
  • Business impact: Ensures the project benefits from the latest features and improvements in the ruff linter.
  • Risk evaluation: Low risk as it is a dependency update.
  • Implementation quality: The change is straightforward and well-implemented.

πŸ’‘ LlamaPReview Community
Have feedback on this AI Code review tool? Join our GitHub Discussions to share your thoughts and help shape the future of LlamaPReview.

@github-actions github-actions bot merged commit 6dee455 into dev Jan 9, 2025
7 of 8 checks passed
@github-actions github-actions bot deleted the renovate/ruff-0.x branch January 9, 2025 16:00
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 64.56%. Comparing base (a56dfcd) to head (7be176e).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #555      +/-   ##
==========================================
- Coverage   65.43%   64.56%   -0.88%     
==========================================
  Files          10       10              
  Lines         570      570              
==========================================
- Hits          373      368       -5     
- Misses        197      202       +5     

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants