fix(fstring): minor typos
This commit is contained in:
@@ -116,5 +116,5 @@ class FormatSpecLexer:
|
||||
while self.peek().isdigit():
|
||||
self.advance()
|
||||
|
||||
value: float = float(self.source[self.start:self.idx])
|
||||
value: int = int(self.source[self.start:self.idx])
|
||||
self.add_token(TokenType.NUMBER, value)
|
||||
|
||||
@@ -94,7 +94,7 @@ class FormatSpecParser:
|
||||
if self.match(TokenType.NUMBER):
|
||||
width = self.previous().value
|
||||
if self.match(TokenType.COMMA, TokenType.UNDERSCORE):
|
||||
grouping = self.previous().value
|
||||
grouping = self.previous()
|
||||
return FormatSpecIntegral(
|
||||
width=width,
|
||||
grouping=grouping
|
||||
@@ -107,7 +107,7 @@ class FormatSpecParser:
|
||||
if self.match(TokenType.NUMBER):
|
||||
precision = self.previous().value
|
||||
if self.match(TokenType.COMMA, TokenType.UNDERSCORE):
|
||||
grouping = self.previous().value
|
||||
grouping = self.previous()
|
||||
return FormatSpecDecimal(
|
||||
precision=precision,
|
||||
grouping=grouping
|
||||
|
||||
Reference in New Issue
Block a user