From dcf6ac240de1d9c465868964c972a632ebbf0170 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 7 Mar 2024 13:57:37 -0500 Subject: Updates for ruff 0.3.1 (#10548) --- docs/development/custom-vectors/arc4/generate_arc4.py | 5 ++--- .../custom-vectors/rsa-oaep-sha2/generate_rsa_oaep_sha2.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/development/custom-vectors/arc4/generate_arc4.py b/docs/development/custom-vectors/arc4/generate_arc4.py index 208d185..3f81691 100644 --- a/docs/development/custom-vectors/arc4/generate_arc4.py +++ b/docs/development/custom-vectors/arc4/generate_arc4.py @@ -80,9 +80,8 @@ def _build_vectors(): output.append(f"OFFSET = {offset}") output.append(f"PLAINTEXT = {binascii.hexlify(plaintext)}") output.append( - "CIPHERTEXT = {}".format( - binascii.hexlify(encryptor.update(plaintext)) - ) + f"CIPHERTEXT = " + f"{binascii.hexlify(encryptor.update(plaintext))}" ) current_offset += len(plaintext) assert not encryptor.finalize() diff --git a/docs/development/custom-vectors/rsa-oaep-sha2/generate_rsa_oaep_sha2.py b/docs/development/custom-vectors/rsa-oaep-sha2/generate_rsa_oaep_sha2.py index f9e7912..42975ff 100644 --- a/docs/development/custom-vectors/rsa-oaep-sha2/generate_rsa_oaep_sha2.py +++ b/docs/development/custom-vectors/rsa-oaep-sha2/generate_rsa_oaep_sha2.py @@ -82,9 +82,8 @@ def build_vectors(mgf1alg, hashalg, filename): ), ) output.append( - "# OAEP Example {} alg={} mgf1={}".format( - count, hashalg.name, mgf1alg.name - ) + f"# OAEP Example {count} alg={hashalg.name} " + f"mgf1={mgf1alg.name}" ) count += 1 output.append("# Message:") -- cgit v1.1