Skip to content

Commit

Permalink
applied black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Jan 18, 2022
1 parent bd2647f commit ee22cea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion spacepackets/ccsds/spacepacket.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ def __handle_packet_id_match(
tm_list: List[bytearray],
) -> (int, int):
next_packet_len_field = (
concatenated_packets[current_idx + 4] << 8 | concatenated_packets[current_idx + 5]
concatenated_packets[current_idx + 4] << 8
| concatenated_packets[current_idx + 5]
)
total_packet_len = get_total_space_packet_len_from_len_field(next_packet_len_field)
# Might be part of packet. Put back into analysis queue as whole
Expand Down
8 changes: 6 additions & 2 deletions spacepackets/ecss/tm.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ def ssc(self) -> int:
def crc16(self) -> int:
return self._crc16

def get_full_packet_string(self, print_format: PrintFormats = PrintFormats.HEX) -> str:
def get_full_packet_string(
self, print_format: PrintFormats = PrintFormats.HEX
) -> str:
packet_raw = self.pack()
return get_printable_data_string(
print_format=print_format, data=packet_raw, length=len(packet_raw)
Expand All @@ -298,7 +300,9 @@ def print_source_data(self, print_format: PrintFormats = PrintFormats.HEX):
"""Prints the TM source data in a clean format"""
print(self.get_source_data_string(print_format=print_format))

def get_source_data_string(self, print_format: PrintFormats = PrintFormats.HEX) -> str:
def get_source_data_string(
self, print_format: PrintFormats = PrintFormats.HEX
) -> str:
"""Returns the source data string"""
return get_printable_data_string(
print_format=print_format,
Expand Down

0 comments on commit ee22cea

Please sign in to comment.