Skip to content

Conversation

VascoSch92
Copy link
Contributor

The PR add the fix safety section for rule FLY002 (#15584 )

The motivation for the content of the fix safety section is given by the following example

foo = 1
bar = [2, 3]

try:
    result_join = " ".join((foo, bar))
    print(f"Join result: {result_join}")
except TypeError as e:
    print(f"Join error: {e}")

which print Join error: sequence item 0: expected str instance, int found

But after the fix is applied, we have

foo = 1
bar = [2, 3]

try:
    result_join = f"{foo} {bar}"
    print(f"Join result: {result_join}")
except TypeError as e:
    print(f"Join error: {e}")

which print Join result: 1 [2, 3]

Copy link
Contributor

github-actions bot commented Apr 20, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@AlexWaygood AlexWaygood added the documentation Improvements or additions to documentation label Apr 22, 2025
@dylwil3 dylwil3 self-assigned this Apr 22, 2025
Copy link
Collaborator

@dylwil3 dylwil3 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!

@dylwil3 dylwil3 enabled auto-merge (squash) April 26, 2025 15:58
@dylwil3 dylwil3 merged commit 64ba39a into astral-sh:main Apr 26, 2025
32 checks passed
@MeGaGiGaGon MeGaGiGaGon mentioned this pull request Jun 21, 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