summaryrefslogtreecommitdiff
path: root/docs/source
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2021-03-29 19:54:47 -0700
committerAnthony Sottile <asottile@umich.edu>2021-03-30 17:37:13 -0700
commitc4c4351699442195df64d3540d58c9fe221a48ae (patch)
treee6ef4445310d4d1111d76146332c56ece8715781 /docs/source
parentcb36e206a5ed5610a2f94f9893bbfd75036dc0ad (diff)
downloadflake8-c4c4351699442195df64d3540d58c9fe221a48ae.tar.gz
audit .format(...) calls
Diffstat (limited to 'docs/source')
-rw-r--r--docs/source/internal/writing-code.rst6
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