-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't emit FURB120 when deleting default arg would change semantics (#…
…289): Closes #288. Previously FURB120 would emit an error for any default arg it found, but in some cases following Refurb's advice would cause an error. The issue is that non-default positional args that follow default positional args cannot be removed, so Refurb should ignore these default values that are "trapped" behind a non-default one.
- Loading branch information
Showing
3 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,9 @@ def args(*args, x: int = 1): | |
C2.over(1) | ||
C2.over(2) | ||
|
||
f(0, 2) | ||
f(1, b=3) | ||
|
||
|
||
# these should not | ||
|
||
|
This file contains 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