Skip to content

Commit e401d00

Browse files
committed
generate.py: reformat for black 2026.1.0
1 parent 06cedec commit e401d00

1 file changed

Lines changed: 9 additions & 24 deletions

File tree

‎tests/generate.py‎

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,7 @@ def generate_tls_server_cert_test(
307307
check_cert(ee, ca, &[%(valid_names_str)s], &[%(invalid_names_str)s], &[%(presented_names_str)s]),
308308
%(expected)s
309309
);
310-
}"""
311-
% locals(),
310+
}""" % locals(),
312311
file=output,
313312
)
314313

@@ -709,8 +708,7 @@ def _test(
709708
check_sig(ee, %(algorithm)s, message, signature),
710709
%(expected)s
711710
);
712-
}"""
713-
% locals(),
711+
}""" % locals(),
714712
file=output,
715713
)
716714

@@ -725,8 +723,7 @@ def _test(
725723
check_sig_rpk(rpk, %(algorithm)s, message, signature),
726724
%(expected)s
727725
);
728-
}"""
729-
% locals(),
726+
}""" % locals(),
730727
file=output,
731728
)
732729

@@ -777,8 +774,7 @@ def bad_algorithms_for_key(
777774
Err(webpki::Error::UnsupportedSignatureAlgorithmForPublicKeyContext(_))
778775
));
779776
}
780-
}"""
781-
% locals(),
777+
}""" % locals(),
782778
file=output,
783779
)
784780

@@ -1096,29 +1092,19 @@ def _write_revocation_test(*, owned: bool) -> None:
10961092

10971093
crl_includes: str = ""
10981094
if not owned:
1099-
crl_includes = "\n".join(
1100-
[
1101-
f"""
1095+
crl_includes = "\n".join([f"""
11021096
&webpki::CertRevocationList::Borrowed(
11031097
webpki::BorrowedCertRevocationList::from_der(include_bytes!("{path}").as_slice())
11041098
.unwrap()
11051099
),
1106-
"""
1107-
for path in crl_paths
1108-
]
1109-
)
1100+
""" for path in crl_paths])
11101101
else:
1111-
crl_includes = "\n".join(
1112-
[
1113-
f"""
1102+
crl_includes = "\n".join([f"""
11141103
&webpki::CertRevocationList::Owned(
11151104
webpki::OwnedCertRevocationList::from_der(include_bytes!("{path}").as_slice())
11161105
.unwrap()
11171106
),
1118-
"""
1119-
for path in crl_paths
1120-
]
1121-
)
1107+
""" for path in crl_paths])
11221108

11231109
if len(crl_paths) == 0:
11241110
revocation_setup = "let revocation = None;"
@@ -1157,8 +1143,7 @@ def _write_revocation_test(*, owned: bool) -> None:
11571143
%(revocation_setup)s
11581144
assert_eq!(check_cert(ee, intermediates, ca, revocation), %(expected)s);
11591145
}
1160-
"""
1161-
% locals(),
1146+
""" % locals(),
11621147
file=output,
11631148
)
11641149

0 commit comments

Comments
 (0)