Skip to content

Commit

Permalink
Merge pull request #81 from us-irs/minor-typing-improvements
Browse files Browse the repository at this point in the history
minor typing improvements
  • Loading branch information
robamu authored Oct 15, 2024
2 parents aa3bc7d + 1837cfb commit 87c46aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spacepackets/uslp/header.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations
from abc import abstractmethod
from typing import Optional
from typing import Optional, Tuple
import enum
import struct

Expand Down Expand Up @@ -77,7 +77,7 @@ def _unpack_raw_header_base_fields(
raw_packet: bytes,
truncated: bool = False,
uslp_version: int = USLP_VERSION_NUMBER,
) -> (int, SourceOrDestField, int, int):
) -> Tuple[int, SourceOrDestField, int, int]:
if len(raw_packet) < 4:
raise UslpInvalidRawPacketOrFrameLen
version_number = (raw_packet[0] & 0xF0) >> 4
Expand All @@ -94,7 +94,7 @@ def _unpack_raw_header_base_fields(
end_of_frame_primary_header = raw_packet[3] & 0b1
if end_of_frame_primary_header != truncated:
raise UslpTypeMissmatch
return scid, src_dest, vcid, map_id
return scid, SourceOrDestField(src_dest), vcid, map_id


class TruncatedPrimaryHeader(PrimaryHeaderBase):
Expand Down

0 comments on commit 87c46aa

Please sign in to comment.