diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-27 10:40:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-27 10:40:00 +0000 |
commit | e0719babdc8744144449c81fac14ba7bbf21446f (patch) | |
tree | 36e17925ec537746a9bb1ce7035b216529a957a5 /ptpython/lexer.py | |
parent | Releasing debian version 3.0.22-2. (diff) | |
download | ptpython-e0719babdc8744144449c81fac14ba7bbf21446f.tar.xz ptpython-e0719babdc8744144449c81fac14ba7bbf21446f.zip |
Merging upstream version 3.0.23.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ptpython/lexer.py')
-rw-r--r-- | ptpython/lexer.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ptpython/lexer.py b/ptpython/lexer.py index 62e470f..81924c9 100644 --- a/ptpython/lexer.py +++ b/ptpython/lexer.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Callable, Optional from prompt_toolkit.document import Document @@ -17,7 +19,7 @@ class PtpythonLexer(Lexer): use a Python 3 lexer. """ - def __init__(self, python_lexer: Optional[Lexer] = None) -> None: + def __init__(self, python_lexer: Lexer | None = None) -> None: self.python_lexer = python_lexer or PygmentsLexer(PythonLexer) self.system_lexer = PygmentsLexer(BashLexer) |