Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: lpascal-ledger <[email protected]>
  • Loading branch information
bigspider and lpascal-ledger authored Dec 10, 2024
1 parent 6489700 commit 57e5d93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test_utils/musig2.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def parse_script(self) -> str:
self.index += 1
return self.input[start:self.index]

def parse_key_indexes(self):
def parse_key_indexes(self) -> List[int]:
nums = []
self.consume('@')
nums.append(self.parse_num())
Expand All @@ -366,13 +366,13 @@ def parse_key_indexes(self):
nums.append(self.parse_num())
return nums

def parse_num(self):
def parse_num(self) -> int:
start = self.index
while self.index < self.length and self.input[self.index].isdigit():
self.index += 1
return int(self.input[start:self.index])

def consume(self, char):
def consume(self, char: str) -> None:
if self.input[self.index:self.index+len(char)] == char:
self.index += len(char)
else:
Expand Down

0 comments on commit 57e5d93

Please sign in to comment.