Skip to content

Commit ac981a6

Browse files
authored
Merge pull request #2647 from h4l0gen/make_variable_publlic
made variable public
2 parents 2f80ad5 + 83974c7 commit ac981a6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tuf/api/dsse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class SimpleEnvelope(Generic[T], BaseSimpleEnvelope):
5252
5353
"""
5454

55-
_DEFAULT_PAYLOAD_TYPE = "application/vnd.tuf+json"
55+
DEFAULT_PAYLOAD_TYPE = "application/vnd.tuf+json"
5656

5757
@classmethod
5858
def from_bytes(cls, data: bytes) -> "SimpleEnvelope[T]":
@@ -119,7 +119,7 @@ def from_signed(cls, signed: T) -> "SimpleEnvelope[T]":
119119
except Exception as e:
120120
raise SerializationError from e
121121

122-
return cls(json_bytes, cls._DEFAULT_PAYLOAD_TYPE, {})
122+
return cls(json_bytes, cls.DEFAULT_PAYLOAD_TYPE, {})
123123

124124
def get_signed(self) -> T:
125125
"""Extract and deserialize payload JSON bytes from envelope.

tuf/ngclient/_internal/trusted_metadata_set.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,9 @@ def _load_from_simple_envelope(
490490

491491
envelope = SimpleEnvelope[T].from_bytes(data)
492492

493-
if envelope.payload_type != SimpleEnvelope._DEFAULT_PAYLOAD_TYPE: # noqa: SLF001
493+
if envelope.payload_type != SimpleEnvelope.DEFAULT_PAYLOAD_TYPE:
494494
raise exceptions.RepositoryError(
495-
f"Expected '{SimpleEnvelope._DEFAULT_PAYLOAD_TYPE}', " # noqa: SLF001
495+
f"Expected '{SimpleEnvelope.DEFAULT_PAYLOAD_TYPE}', "
496496
f"got '{envelope.payload_type}'"
497497
)
498498

0 commit comments

Comments
 (0)