-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Understand starred expression used in string formatting RHS tuple (#1299
) Fixes #957
- Loading branch information
Showing
6 changed files
with
45 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
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 @@ | ||
# pylint: disable=missing-docstring,import-error | ||
|
||
|
||
def issue_957_good(): | ||
meat = ['spam', 'ham'] | ||
print('%s%s%s' % ('eggs', *meat)) | ||
|
||
|
||
def issue_957_bad1(): | ||
meat = ['spam', 'ham', 'monthy python'] | ||
print('%s%s%s' % ('eggs', *meat)) # [too-many-format-args] | ||
|
||
|
||
def issue_957_bad2(): | ||
meat = ['spam'] | ||
print('%s%s%s' % ('eggs', *meat)) # [too-few-format-args] | ||
|
||
|
||
def issue_957_uninferable(): | ||
from butchery import meat | ||
print('%s%s%s' % ('eggs', *meat)) |
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,2 @@ | ||
[testoptions] | ||
min_pyver=3.0 |
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,2 @@ | ||
too-many-format-args:11:issue_957_bad1:Too many arguments for format string | ||
too-few-format-args:16:issue_957_bad2:Not enough arguments for format string |