Skip to content

Commit 79c803e

Browse files
committed
Use typing instead of __future__.annotations.
1 parent a489aef commit 79c803e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/textinput.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
66
Shows how to use the TEXTEDITING and TEXTINPUT events.
77
"""
8-
from __future__ import annotations
9-
8+
from typing import Tuple, List
109
import sys
1110
import os
1211

@@ -39,8 +38,8 @@ class TextInput:
3938
def __init__(
4039
self,
4140
prompt: str,
42-
pos: tuple[int, int],
43-
screen_dimensions: tuple[int, int],
41+
pos: Tuple[int, int],
42+
screen_dimensions: Tuple[int, int],
4443
print_event: bool,
4544
text_color="white",
4645
fps: int = 50,
@@ -77,7 +76,7 @@ def __init__(
7776

7877
print("Using font: " + self.font.name)
7978

80-
def update(self, events: list[pygame.Event]) -> None:
79+
def update(self, events: List[pygame.Event]) -> None:
8180
"""
8281
Updates the text input widget
8382
"""

0 commit comments

Comments
 (0)