Skip to content

Commit 76f7701

Browse files
format
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
1 parent d61a004 commit 76f7701

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

sigstore/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ def _from_dict_rekor(cls, dict_: dict[str, Any]) -> LogEntry:
223223
if tlog_entry.inclusion_promise:
224224
inclusion_promise = B64Str(
225225
base64.b64encode(
226-
tlog_entry.inclusion_promise.signed_entry_timestamp).decode()
226+
tlog_entry.inclusion_promise.signed_entry_timestamp
227+
).decode()
227228
)
228229

229-
230230
return LogEntry(
231231
uuid=None,
232232
body=B64Str(base64.b64encode(tlog_entry.canonicalized_body).decode()),

test/unit/test_models.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,18 @@ def test_missing_inclusion_proof(self):
4343
)
4444

4545
def test_missing_inclusion_promise_round_trip(self, signing_bundle):
46-
'''
46+
"""
4747
Ensures that LogEntry._to_rekor() succeeds even without an inclusion_promise.
48-
'''
48+
"""
4949
bundle: Bundle
5050
_, bundle = signing_bundle("bundle.txt")
5151
_dict = bundle.log_entry._to_rekor().to_dict()
5252
print(_dict)
53-
del _dict['inclusionPromise']
53+
del _dict["inclusionPromise"]
5454
entry = LogEntry._from_dict_rekor(_dict)
5555
assert entry.inclusion_promise is None
5656
assert entry._to_rekor() is not None
57-
assert (LogEntry._from_dict_rekor(
58-
entry._to_rekor().to_dict()) == entry)
57+
assert LogEntry._from_dict_rekor(entry._to_rekor().to_dict()) == entry
5958

6059
def test_logentry_roundtrip(self, signing_bundle):
6160
_, bundle = signing_bundle("bundle.txt")

0 commit comments

Comments
 (0)