diff options
Diffstat (limited to 'ptpython/validator.py')
-rw-r--r-- | ptpython/validator.py | 4 |
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: |