diff options
| author | Anthony Sottile <asottile@umich.edu> | 2021-03-29 19:54:47 -0700 |
|---|---|---|
| committer | Anthony Sottile <asottile@umich.edu> | 2021-03-30 17:37:13 -0700 |
| commit | c4c4351699442195df64d3540d58c9fe221a48ae (patch) | |
| tree | e6ef4445310d4d1111d76146332c56ece8715781 /docs/source | |
| parent | cb36e206a5ed5610a2f94f9893bbfd75036dc0ad (diff) | |
| download | flake8-c4c4351699442195df64d3540d58c9fe221a48ae.tar.gz | |
audit .format(...) calls
Diffstat (limited to 'docs/source')
| -rw-r--r-- | docs/source/internal/writing-code.rst | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/docs/source/internal/writing-code.rst b/docs/source/internal/writing-code.rst index d8c63fe..daf1d57 100644 --- a/docs/source/internal/writing-code.rst +++ b/docs/source/internal/writing-code.rst @@ -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 |
