summaryrefslogtreecommitdiffstats
path: root/ptpython/utils.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-27 10:40:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-27 10:40:00 +0000
commite0719babdc8744144449c81fac14ba7bbf21446f (patch)
tree36e17925ec537746a9bb1ce7035b216529a957a5 /ptpython/utils.py
parentReleasing debian version 3.0.22-2. (diff)
downloadptpython-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/utils.py')
-rw-r--r--ptpython/utils.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/ptpython/utils.py b/ptpython/utils.py
index ef96ca4..5348899 100644
--- a/ptpython/utils.py
+++ b/ptpython/utils.py
@@ -1,6 +1,8 @@
"""
For internal use only.
"""
+from __future__ import annotations
+
import re
from typing import (
TYPE_CHECKING,
@@ -65,8 +67,8 @@ def has_unclosed_brackets(text: str) -> bool:
def get_jedi_script_from_document(
- document: Document, locals: Dict[str, Any], globals: Dict[str, Any]
-) -> "Interpreter":
+ document: Document, locals: dict[str, Any], globals: dict[str, Any]
+) -> Interpreter:
import jedi # We keep this import in-line, to improve start-up time.
# Importing Jedi is 'slow'.
@@ -154,7 +156,7 @@ def if_mousedown(handler: _T) -> _T:
by the Window.)
"""
- def handle_if_mouse_down(mouse_event: MouseEvent) -> "NotImplementedOrNone":
+ def handle_if_mouse_down(mouse_event: MouseEvent) -> NotImplementedOrNone:
if mouse_event.event_type == MouseEventType.MOUSE_DOWN:
return handler(mouse_event)
else: