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

⬆️ 🤖 Dependencies: Update black requirement from ^24.0.0 to >=24,<26 #873

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 3, 2025

Updates the requirements on black to permit the latest version.

Release notes

Sourced from black's releases.

25.1.0

Highlights

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

  • Normalize casing of Unicode escape characters in strings to lowercase (#2916)
  • Fix inconsistencies in whether certain strings are detected as docstrings (#4095)
  • Consistently add trailing commas to typed function parameters (#4164)
  • Remove redundant parentheses in if guards for case blocks (#4214)
  • Add parentheses to if clauses in case blocks when the line is too long (#4269)
  • Whitespace before # fmt: skip comments is no longer normalized (#4146)
  • Fix line length computation for certain expressions that involve the power operator (#4154)
  • Check if there is a newline before the terminating quotes of a docstring (#4185)
  • Fix type annotation spacing between * and more complex type variable tuple (#4440)

The following changes were not in any previous release:

  • Remove parentheses around sole list items (#4312)
  • Generic function definitions are now formatted more elegantly: parameters are split over multiple lines first instead of type parameter definitions (#4553)

Stable style

  • Fix formatting cells in IPython notebooks with magic methods and starting or trailing empty lines (#4484)
  • Fix crash when formatting with statements containing tuple generators/unpacking (#4538)

Preview style

  • Fix/remove string merging changing f-string quotes on f-strings with internal quotes (#4498)
  • Collapse multiple empty lines after an import into one (#4489)
  • Prevent string_processing and wrap_long_dict_values_in_parens from removing parentheses around long dictionary values (#4377)
  • Move wrap_long_dict_values_in_parens from the unstable to preview style (#4561)

Packaging

  • Store license identifier inside the License-Expression metadata field, see PEP 639. (#4479)

Performance

  • Speed up the is_fstring_start function in Black's tokenizer (#4541)

Integrations

  • If using stdin with --stdin-filename set to a force excluded path, stdin won't be

... (truncated)

Changelog

Sourced from black's changelog.

25.1.0

Highlights

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

  • Normalize casing of Unicode escape characters in strings to lowercase (#2916)
  • Fix inconsistencies in whether certain strings are detected as docstrings (#4095)
  • Consistently add trailing commas to typed function parameters (#4164)
  • Remove redundant parentheses in if guards for case blocks (#4214)
  • Add parentheses to if clauses in case blocks when the line is too long (#4269)
  • Whitespace before # fmt: skip comments is no longer normalized (#4146)
  • Fix line length computation for certain expressions that involve the power operator (#4154)
  • Check if there is a newline before the terminating quotes of a docstring (#4185)
  • Fix type annotation spacing between * and more complex type variable tuple (#4440)

The following changes were not in any previous release:

  • Remove parentheses around sole list items (#4312)
  • Generic function definitions are now formatted more elegantly: parameters are split over multiple lines first instead of type parameter definitions (#4553)

Stable style

  • Fix formatting cells in IPython notebooks with magic methods and starting or trailing empty lines (#4484)
  • Fix crash when formatting with statements containing tuple generators/unpacking (#4538)

Preview style

  • Fix/remove string merging changing f-string quotes on f-strings with internal quotes (#4498)
  • Collapse multiple empty lines after an import into one (#4489)
  • Prevent string_processing and wrap_long_dict_values_in_parens from removing parentheses around long dictionary values (#4377)
  • Move wrap_long_dict_values_in_parens from the unstable to preview style (#4561)

Packaging

  • Store license identifier inside the License-Expression metadata field, see PEP 639. (#4479)

Performance

  • Speed up the is_fstring_start function in Black's tokenizer (#4541)

Integrations

... (truncated)

Commits

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)

Summary by Sourcery

Build:

  • Relax the Black version constraint to allow for automatic updates to versions 24 and 25.

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Feb 3, 2025
Copy link

sourcery-ai bot commented Feb 3, 2025

Reviewer's Guide by Sourcery

This pull request updates the black dependency to allow versions greater than or equal to 24 and less than 26.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Update black dependency to allow newer versions.
  • Updated the black dependency version constraint from ^24.0.0 to >=24,<26.
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. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the 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 exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

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, dependabot[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: Update the black dependency requirement to allow versions from >=24 to <26.
  • Key components modified: pyproject.toml
  • Cross-component impacts: None
  • Business value alignment: Ensures compatibility with the latest versions of the black formatter, which includes new features and bug fixes.

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.9.0"
  -black = "^24.0.0"
  +black = ">=24,<26"
  pre-commit = "^4.0.0"
  • Analysis:
    • Current logic and potential issues: The current logic updates the black dependency to a more flexible version range. This change allows the project to benefit from the latest features and bug fixes in black without being locked into a specific minor version.
    • Edge cases and error handling: There are no direct edge cases or error handling considerations in this change since it is a dependency update. However, it is essential to ensure that the new versions of black are compatible with the existing codebase.
    • Cross-component impact: This change does not directly impact other components but ensures that the code formatting tool is up-to-date.
    • Business logic considerations: This update aligns with the business need to keep dependencies current and benefit from the latest improvements in code formatting tools.
  • LlamaPReview Suggested Improvements:
    [tool.poetry.group.dev.dependencies]
    python-semantic-release = ">=8.0.8"
    ruff = "^0.9.0"
    black = ">=24,<26"
    pre-commit = "^4.0.0"
  • Improvement rationale:
    • Technical benefits: Allows the project to benefit from the latest features and bug fixes in black.
    • Business value: Ensures that the codebase remains well-formatted and adheres to the latest coding standards.
    • Risk assessment: Low risk, as black is a widely used and stable tool. However, it is crucial to test the new versions to ensure compatibility with the existing codebase.

3. Risk Assessment

3.1 Critical Issues

🔴 P0 (Must Fix):

  • Issue: None identified.
  • Impact:
    • Technical implications: None.
    • Business consequences: None.
    • User experience effects: None.
  • Resolution:
    • Specific code changes: None.
    • Configuration updates: None.
    • Testing requirements: Ensure compatibility testing with the new versions of black.

3.2 Important Improvements

🟡 P1 (Should Fix):

  • Issue: Ensure comprehensive testing with the new versions of black.
  • Current Impact:
    • Performance implications: None.
    • Maintenance overhead: None.
    • Future scalability: None.
  • Suggested Solution:
    • Implementation approach: Run the formatter on the entire codebase and check for any formatting issues or errors.
    • Migration strategy: Update the CI/CD pipeline to use the latest version of black and run all tests.
    • Testing considerations: Ensure that all code is correctly formatted and that no new issues are introduced.

3.3 Minor Suggestions

🟢 P2 (Consider):

  • Area: Documentation updates.
  • Improvement Opportunity:
    • Code quality enhancement: Update the documentation to reflect the new dependency version range.
    • Best practice alignment: Ensure that the documentation includes instructions on how to update and use the latest version of black.
    • Documentation updates: Update the README or contributing guidelines to mention the new version range for black.

4. Requirements Analysis

4.1 Functional Coverage

  • Requirements mapping:
    • Implemented features: Update black dependency to allow versions >=24 and <26.
    • Missing elements: None.
    • Edge cases handling: Ensure that the new versions of black are compatible with the existing codebase.
  • Business Logic:
    • Use case coverage: The update ensures that the codebase benefits from the latest features and bug fixes in black.
    • Business rule implementation: The update aligns with the business need to keep dependencies current.
    • Data flow correctness: The change does not affect data flow.

4.2 Non-functional Aspects

  • Performance metrics: None.
  • Security considerations: Ensure that the new versions of black do not introduce any security vulnerabilities.
  • Scalability factors: None.
  • Maintainability aspects: The update improves maintainability by keeping the dependency up-to-date.

5. Testing Strategy

  • Test Coverage:
    • Unit test requirements: Ensure that all code is correctly formatted with the new versions of black.
    • Integration test scenarios: Run the formatter on the entire codebase and check for any issues.
    • Edge case validation: Test the formatter with various code samples to ensure compatibility.
  • Quality Metrics:
    • Current coverage: Ensure that the CI/CD pipeline includes tests for code formatting.
    • Critical paths: Ensure that the formatter runs successfully on all critical paths.
    • Performance benchmarks: None.

6. Final Assessment

6.1 Key Action Items

  1. Critical Changes (P0):

    • None identified.
  2. Important Improvements (P1):

    • Ensure comprehensive testing with the new versions of black.
  3. Suggested Enhancements (P2):

    • Update documentation to reflect the new dependency version range.

6.2 Overall Evaluation

  • Technical assessment: The update is straightforward and aligns with keeping dependencies current.
  • Business impact: Positive, as it ensures the codebase benefits from the latest features and bug fixes in black.
  • Risk evaluation: Low risk, but comprehensive testing is essential to ensure compatibility.
  • Implementation quality: The change is well-implemented and aligns with best practices for dependency management.

💡 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.

@dependabot dependabot bot force-pushed the dependabot/pip/dev/black-gte-24-and-lt-26 branch 3 times, most recently from 053e390 to 1707751 Compare February 3, 2025 21:09
@dependabot dependabot bot force-pushed the dependabot/pip/dev/black-gte-24-and-lt-26 branch 6 times, most recently from 1259518 to abb5057 Compare February 5, 2025 17:04
@dependabot dependabot bot force-pushed the dependabot/pip/dev/black-gte-24-and-lt-26 branch from abb5057 to 9202e9d Compare February 7, 2025 22:01
Updates the requirements on [black](https://github.com/psf/black) to permit the latest version.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@24.1a1...25.1.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/pip/dev/black-gte-24-and-lt-26 branch from 9202e9d to ae6429f Compare February 8, 2025 02:41
@mraniki mraniki closed this Feb 8, 2025
Copy link
Contributor Author

dependabot bot commented on behalf of github Feb 8, 2025

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/pip/dev/black-gte-24-and-lt-26 branch February 8, 2025 21:34
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant