From ba98bcd4a07c589722c6db103b363c8aa1d3561d Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 24 Dec 2018 09:43:45 +0100 Subject: Use f-strings where possible Replaces str.format, which is less readable due to its separation of format and arguments. --- crocoite/test_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crocoite/test_tools.py') diff --git a/crocoite/test_tools.py b/crocoite/test_tools.py index c320ad9..106aa59 100644 --- a/crocoite/test_tools.py +++ b/crocoite/test_tools.py @@ -97,7 +97,7 @@ def test_different_payload(writer): httpHeaders = StatusAndHeaders('200 OK', {}, protocol='HTTP/1.1') record = writer.create_warc_record ('http://example.com/', 'response', - payload=BytesIO('data{}'.format(i).encode ('utf8')), + payload=BytesIO(f'data{i}'.encode ('utf8')), warc_headers_dict=warcHeaders, http_headers=httpHeaders) records.append (record) -- cgit v1.2.3