Skip to content

Commit ab8b38e

Browse files
Fix linting
Signed-off-by: Maya Costantini <[email protected]>
1 parent 2b40813 commit ab8b38e

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

sigstore/sign.py

+21-5
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ class Signer:
8282
The primary API for signing operations.
8383
"""
8484

85-
def __init__(self, *, fulcio: FulcioClient, rekor: RekorClient, single_certificate: bool=False):
85+
def __init__(
86+
self,
87+
*,
88+
fulcio: FulcioClient,
89+
rekor: RekorClient,
90+
single_certificate: bool = False,
91+
):
8692
"""
8793
Create a new `Signer`.
8894
@@ -108,7 +114,11 @@ def production(cls, single_certificate=False) -> Signer:
108114
"""
109115
updater = TrustUpdater.production()
110116
rekor = RekorClient.production(updater)
111-
return cls(fulcio=FulcioClient.production(), rekor=rekor, single_certificate=single_certificate)
117+
return cls(
118+
fulcio=FulcioClient.production(),
119+
rekor=rekor,
120+
single_certificate=single_certificate,
121+
)
112122

113123
@classmethod
114124
def staging(cls, single_certificate=False) -> Signer:
@@ -117,7 +127,11 @@ def staging(cls, single_certificate=False) -> Signer:
117127
"""
118128
updater = TrustUpdater.staging()
119129
rekor = RekorClient.staging(updater)
120-
return cls(fulcio=FulcioClient.staging(), rekor=rekor, single_certificate=single_certificate)
130+
return cls(
131+
fulcio=FulcioClient.staging(),
132+
rekor=rekor,
133+
single_certificate=single_certificate,
134+
)
121135

122136
@property
123137
def private_key(self) -> ec.EllipticCurvePrivateKey:
@@ -130,6 +144,7 @@ def private_key(self) -> ec.EllipticCurvePrivateKey:
130144
@property
131145
def signing_cert(self) -> FulcioCertificateSigningResponse:
132146
"""Get or request a signing certificate for Fulcio."""
147+
133148
def get_signing_cert(identity_token: str) -> FulcioCertificateSigningResponse:
134149
if not self._single_certificate or self._signing_certificate is None:
135150
logger.debug("Retrieving signed certificate...")
@@ -144,7 +159,9 @@ def get_signing_cert(identity_token: str) -> FulcioCertificateSigningResponse:
144159
.subject_name(
145160
x509.Name(
146161
[
147-
x509.NameAttribute(NameOID.EMAIL_ADDRESS, oidc_identity.proof),
162+
x509.NameAttribute(
163+
NameOID.EMAIL_ADDRESS, oidc_identity.proof
164+
),
148165
]
149166
)
150167
)
@@ -164,7 +181,6 @@ def get_signing_cert(identity_token: str) -> FulcioCertificateSigningResponse:
164181

165182
return get_signing_cert
166183

167-
168184
def sign(
169185
self,
170186
input_: IO[bytes],

0 commit comments

Comments
 (0)