Skip to content

Commit 8cb6fc7

Browse files
authored
fix: resolve circular import of models.LogEntry (#1458)
Signed-off-by: SequeI <[email protected]>
1 parent aa695c4 commit 8cb6fc7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sigstore/_internal/rekor/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
from __future__ import annotations
2020

2121
import base64
22+
import typing
2223
from abc import ABC, abstractmethod
23-
from typing import Any, NewType
2424

2525
import rekor_types
2626
import requests
@@ -29,13 +29,15 @@
2929
from sigstore._utils import base64_encode_pem_cert
3030
from sigstore.dsse import Envelope
3131
from sigstore.hashes import Hashed
32-
from sigstore.models import LogEntry
32+
33+
if typing.TYPE_CHECKING:
34+
from sigstore.models import LogEntry
3335

3436
__all__ = [
3537
"_hashedrekord_from_parts",
3638
]
3739

38-
EntryRequestBody = NewType("EntryRequestBody", dict[str, Any])
40+
EntryRequestBody = typing.NewType("EntryRequestBody", dict[str, typing.Any])
3941

4042

4143
class RekorClientError(Exception):

0 commit comments

Comments
 (0)