fix(fstring): minor typos

This commit is contained in:
2026-02-07 19:25:18 +01:00
parent 2784518887
commit 34873c7e0e
2 changed files with 3 additions and 3 deletions

View File

@@ -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)

View File

@@ -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