Upgrade mutable-argument-defaults to unsafe#8108
Merged
charliermarsh merged 2 commits intoastral-sh:mainfrom Oct 21, 2023
Merged
Upgrade mutable-argument-defaults to unsafe#8108charliermarsh merged 2 commits intoastral-sh:mainfrom
charliermarsh merged 2 commits intoastral-sh:mainfrom
Conversation
Contributor
PR Check ResultsEcosystemℹ️ ecosystem check detected changes. (+3, -3, 0 error(s)) airflow (+1, -1)
- [*] 16165 fixable with the `--fix` option (6215 hidden fixes can be enabled with the `--unsafe-fixes` option). + [*] 16165 fixable with the `--fix` option (6225 hidden fixes can be enabled with the `--unsafe-fixes` option). bokeh (+1, -1)
- [*] 17800 fixable with the `--fix` option (4370 hidden fixes can be enabled with the `--unsafe-fixes` option). + [*] 17800 fixable with the `--fix` option (4404 hidden fixes can be enabled with the `--unsafe-fixes` option). latch (+1, -1)
- [*] 206 fixable with the `--fix` option (35 hidden fixes can be enabled with the `--unsafe-fixes` option). + [*] 206 fixable with the `--fix` option (40 hidden fixes can be enabled with the `--unsafe-fixes` option). |
zanieb
reviewed
Oct 21, 2023
|
|
||
| let initialization_edit = Edit::insertion(content, pos); | ||
| Some(Fix::display_edits(default_edit, [initialization_edit])) | ||
| Some(Fix::unsafe_edits(default_edit, [initialization_edit])) |
Member
There was a problem hiding this comment.
Can we add a note here explaining why the fix is unsafe? I'm not sure why it was marked as unapplicable originally as the fix looks relatively safe to me?
Contributor
Author
There was a problem hiding this comment.
Commented on this in the issue: #8104 (comment)
Contributor
Author
There was a problem hiding this comment.
I've added a Known problems section to explain why the fix is unsafe.
e25ed58 to
8f6247a
Compare
8f6247a to
9edcb67
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #8104
Test Plan
Covered by snapshot tests.