We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d58324d commit 750df02Copy full SHA for 750df02
Lib/_colorize.py
@@ -399,12 +399,12 @@ class _Span(NamedTuple):
399
end: int
400
401
@classmethod
402
- def from_re(cls, m: Match[str], group: int | str) -> "_Span":
+ def from_re(cls, m: Match[str], group: int | str) -> Self:
403
re_span = m.span(group)
404
return cls(re_span[0], re_span[1] - 1)
405
406
407
- def from_token(cls, token: TI, line_len: list[int]) -> "_Span":
+ def from_token(cls, token: TI, line_len: list[int]) -> Self:
408
end_offset = -1
409
if (token.type in {T.FSTRING_MIDDLE, T.TSTRING_MIDDLE}
410
and token.string.endswith(("{", "}"))):
0 commit comments