mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-04 20:26:53 +00:00
audit .format(...) calls
This commit is contained in:
parent
cb36e206a5
commit
c4c4351699
6 changed files with 10 additions and 26 deletions
|
|
@ -175,11 +175,7 @@ across multiple lines, insert a new-line after the opening parenthesis, e.g.,
|
|||
statistic = next(stats_for_error_code)
|
||||
count = statistic.count
|
||||
count += sum(stat.count for stat in stats_for_error_code)
|
||||
self._write('{count:<5} {error_code} {message}'.format(
|
||||
count=count,
|
||||
error_code=error_code,
|
||||
message=statistic.message,
|
||||
))
|
||||
self._write(f'{count:<5} {error_code} {statistic.message}')
|
||||
|
||||
In the first example, we put a few of the parameters all on one line, and then
|
||||
added the last two on their own. In the second example, each parameter has its
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue