summaryrefslogtreecommitdiffstats
path: root/ptpython/validator.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-27 10:39:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-27 10:39:56 +0000
commiteeeaff8afe94b2806a79a02b7c01c912a984a22f (patch)
tree97983910e3beb2f21c346165f69f3fc57a411b15 /ptpython/validator.py
parentAdding upstream version 3.0.22. (diff)
downloadptpython-eeeaff8afe94b2806a79a02b7c01c912a984a22f.tar.xz
ptpython-eeeaff8afe94b2806a79a02b7c01c912a984a22f.zip
Adding upstream version 3.0.23.upstream/3.0.23
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ptpython/validator.py')
-rw-r--r--ptpython/validator.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ptpython/validator.py b/ptpython/validator.py
index ffac583..3b36d27 100644
--- a/ptpython/validator.py
+++ b/ptpython/validator.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Callable, Optional
from prompt_toolkit.document import Document
@@ -16,7 +18,7 @@ class PythonValidator(Validator):
active compiler flags.
"""
- def __init__(self, get_compiler_flags: Optional[Callable[[], int]] = None) -> None:
+ def __init__(self, get_compiler_flags: Callable[[], int] | None = None) -> None:
self.get_compiler_flags = get_compiler_flags
def validate(self, document: Document) -> None: