Skip to content

Conversation

@Kalmaegi
Copy link
Contributor

@Kalmaegi Kalmaegi commented Apr 27, 2025

Summary

This PR add the fix safety section for rule B006 in mutable_argument_default.rs for #15584

When applying this rule for fixes, certain changes may alter the original logical behavior. For example:

before:

def cache(x, storage=[]):
    storage.append(x)
    return storage

print(cache(1))  # [1]
print(cache(2))  # [1, 2]

after:

def cache(x, storage=[]):
    storage.append(x)
    return storage

print(cache(1))  # [1]
print(cache(2))  # [2]

@github-actions
Copy link
Contributor

github-actions bot commented Apr 27, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser MichaReiser added the documentation Improvements or additions to documentation label Apr 27, 2025
Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

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

Thank you!

@ntBre ntBre merged commit 16621fa into astral-sh:main May 28, 2025
34 checks passed
@ntBre ntBre mentioned this pull request May 24, 2025
71 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants