Skip to content

Commit e417283

Browse files
committed
lint: Formatting fixes
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
1 parent 14a5289 commit e417283

File tree

4 files changed

+15
-19
lines changed

4 files changed

+15
-19
lines changed

sigstore/_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ def _attest(args: argparse.Namespace) -> None:
775775
if bundle and bundle.exists() and not args.overwrite:
776776
_invalid_arguments(
777777
args,
778-
"Refusing to overwrite outputs without --overwrite: " f"{bundle}",
778+
f"Refusing to overwrite outputs without --overwrite: {bundle}",
779779
)
780780
output_map[file] = SigningOutputs(bundle=bundle)
781781

test/unit/internal/test_sct.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,16 @@ def test_pack_digitally_signed_precertificate(precert_bytes_len):
4848
_, l1, l2, l3 = struct.unpack("!4c", struct.pack("!I", len(precert_bytes)))
4949

5050
data = sct._pack_digitally_signed(mock_sct, cert, issuer_key_hash)
51-
assert (
52-
data
53-
== (
54-
b"\x00" # version
55-
b"\x00" # signature type
56-
b"\x00\x00\x00\x00\x00\x00\x04\xd2" # timestamp
57-
b"\x00\x01" # entry type
58-
b"iamapublickeyshatwofivesixdigest" # issuer key hash
59-
+ l1
60-
+ l2
61-
+ l3 # tbs cert length
62-
+ precert_bytes # tbs cert
63-
+ b"\x00\x00" # extensions length
64-
+ b"" # extensions
65-
)
51+
assert data == (
52+
b"\x00" # version
53+
b"\x00" # signature type
54+
b"\x00\x00\x00\x00\x00\x00\x04\xd2" # timestamp
55+
b"\x00\x01" # entry type
56+
b"iamapublickeyshatwofivesixdigest" # issuer key hash
57+
+ l1
58+
+ l2
59+
+ l3 # tbs cert length
60+
+ precert_bytes # tbs cert
61+
+ b"\x00\x00" # extensions length
62+
+ b"" # extensions
6663
)

test/unit/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_sha256_streaming(size):
7575

7676

7777
def test_load_pem_public_key_format():
78-
keybytes = b"-----BEGIN PUBLIC KEY-----\n" b"bleh\n" b"-----END PUBLIC KEY-----"
78+
keybytes = b"-----BEGIN PUBLIC KEY-----\nbleh\n-----END PUBLIC KEY-----"
7979
with pytest.raises(
8080
VerificationError, match="could not load PEM-formatted public key"
8181
):

test/unit/verify/test_policy.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ def test_certificate_extension_not_found(self):
9595
)
9696

9797
reason = re.escape(
98-
"Certificate does not contain OIDCIssuer "
99-
"(1.3.6.1.4.1.57264.1.1) extension"
98+
"Certificate does not contain OIDCIssuer (1.3.6.1.4.1.57264.1.1) extension"
10099
)
101100
with pytest.raises(VerificationError, match=reason):
102101
policy_.verify(cert_)

0 commit comments

Comments
 (0)