Skip to content

Commit

Permalink
added return type
Browse files Browse the repository at this point in the history
  • Loading branch information
PWRxPSYCHO committed Jan 1, 2025
1 parent 034feee commit 6077785
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions klv_parser/klv/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def has_enough_data_for_length(idx, data_len) -> bool:
return True


def parse_long_form(data, idx, data_len):
def parse_long_form(data, idx, data_len) -> tuple:
length_of_length_field = data[idx] & 0x7F # Get the number of length bytes
idx += 1 # Move past the first byte

Expand All @@ -109,7 +109,7 @@ def parse_long_form(data, idx, data_len):
return value, idx


def parse_short_form(data, idx, data_len):
def parse_short_form(data, idx, data_len) -> tuple:
length = data[idx] & 0x7F # Get the last 7 bits
idx += 1 # Move past the length byte

Expand Down

0 comments on commit 6077785

Please sign in to comment.