We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
typing
__future__.annotations
1 parent a489aef commit 79c803eCopy full SHA for 79c803e
examples/textinput.py
@@ -5,8 +5,7 @@
5
6
Shows how to use the TEXTEDITING and TEXTINPUT events.
7
"""
8
-from __future__ import annotations
9
-
+from typing import Tuple, List
10
import sys
11
import os
12
@@ -39,8 +38,8 @@ class TextInput:
39
38
def __init__(
40
self,
41
prompt: str,
42
- pos: tuple[int, int],
43
- screen_dimensions: tuple[int, int],
+ pos: Tuple[int, int],
+ screen_dimensions: Tuple[int, int],
44
print_event: bool,
45
text_color="white",
46
fps: int = 50,
@@ -77,7 +76,7 @@ def __init__(
77
76
78
print("Using font: " + self.font.name)
79
80
- def update(self, events: list[pygame.Event]) -> None:
+ def update(self, events: List[pygame.Event]) -> None:
81
82
Updates the text input widget
83
0 commit comments