Skip to content

Commit a2615e8

Browse files
Small typing fixes.
1 parent d8adbe9 commit a2615e8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/prompt_toolkit/formatted_text/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ def __pt_formatted_text__(self) -> StyleAndTextTuples: ...
4545
str,
4646
"MagicFormattedText",
4747
StyleAndTextTuples,
48-
# Callable[[], 'AnyFormattedText'] # Recursive definition not supported by mypy.
49-
Callable[[], Any],
48+
Callable[[], "AnyFormattedText"],
5049
None,
5150
]
5251

src/prompt_toolkit/lexers/pygments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def get_sync_start_position(
104104
return lineno, 0
105105

106106
@classmethod
107-
def from_pygments_lexer_cls(cls, lexer_cls: PygmentsLexerCls) -> RegexSync:
107+
def from_pygments_lexer_cls(cls, lexer_cls: type[PygmentsLexerCls]) -> RegexSync:
108108
"""
109109
Create a :class:`.RegexSync` instance for this Pygments lexer class.
110110
"""

0 commit comments

Comments
 (0)