-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
B026 - Argument unpacking after keyword argument (#287)
* add B026 - Argument unpacking after keyword argument * add support for multiple unpackings * fix wording
- Loading branch information
Showing
4 changed files
with
72 additions
and
0 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
""" | ||
Should emit: | ||
B026 - on lines 16, 17, 18, 19, 20, 21 | ||
""" | ||
|
||
|
||
def foo(bar, baz, bam): | ||
pass | ||
|
||
|
||
bar_baz = ["bar", "baz"] | ||
|
||
foo("bar", "baz", bam="bam") | ||
foo("bar", baz="baz", bam="bam") | ||
foo(bar="bar", baz="baz", bam="bam") | ||
foo(bam="bam", *["bar", "baz"]) | ||
foo(bam="bam", *bar_baz) | ||
foo(baz="baz", bam="bam", *["bar"]) | ||
foo(bar="bar", baz="baz", bam="bam", *[]) | ||
foo(bam="bam", *["bar"], *["baz"]) | ||
foo(*["bar"], bam="bam", *["baz"]) |
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