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 57e5d93 commit b895927
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 @@ -288,7 +288,7 @@ def __init__(self, key: KeyPlaceholder, tree=Optional[Tree]):
self.tree: Optional[Tree] = tree

@classmethod
def from_string(cls, input_string):
def from_string(cls, input_string: str) -> "TrDescriptorTemplate":
parser = cls.Parser(input_string.replace("/**", "/<0;1>/*"))
return parser.parse()

Expand All @@ -298,7 +298,7 @@ def __init__(self, input):
self.index = 0
self.length = len(input)

def parse(self):
def parse(self) -> "TrDescriptorTemplate":
if self.input.startswith('tr('):
self.consume('tr(')
key = self.parse_keyplaceholder()
Expand All @@ -312,7 +312,7 @@ def parse(self):
raise Exception(
"Syntax error: Input does not start with 'tr('")

def parse_keyplaceholder(self):
def parse_keyplaceholder(self) -> KeyPlaceholder:
if self.peek() == '@':
self.consume('@')
key_index = self.parse_num()
Expand Down

0 comments on commit b895927

Please sign in to comment.