Skip to content

Mark PLE1141 fix as unsafe#13629

Merged
zanieb merged 3 commits intomainfrom
zb/ple1141-unsafe
Oct 4, 2024
Merged

Mark PLE1141 fix as unsafe#13629
zanieb merged 3 commits intomainfrom
zb/ple1141-unsafe

Conversation

@zanieb
Copy link
Copy Markdown
Member

@zanieb zanieb commented Oct 4, 2024

Closes #13343

@zanieb zanieb added rule Implementing or modifying a lint rule fixes Related to suggested fixes for violations labels Oct 4, 2024
@zanieb zanieb force-pushed the zb/ple1141-unsafe branch from d9a8020 to 9817dfe Compare October 4, 2024 15:36
Comment on lines +37 to +47
/// ## Fix safety
/// If the dictionary key is a tuple, e.g.:
///
/// ```python
/// d = {(1, 2): 3, (3, 4): 5}
/// for x, y in d:
/// print(x, y)
/// ```
///
/// The tuple key is unpackaged into `x` and `y` instead of the key and values. This means that
/// the suggested fix of using `d.items()` would result in different runtime behavior.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

See also #13627

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 4, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@zanieb zanieb merged commit 2a365bb into main Oct 4, 2024
@zanieb zanieb deleted the zb/ple1141-unsafe branch October 4, 2024 19:22
zanieb added a commit that referenced this pull request Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixes Related to suggested fixes for violations rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid fix for PLE1141

2 participants