summaryrefslogtreecommitdiffstats
path: root/ptpython/utils.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/utils.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/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: