Skip to content

Commit e4b3758

Browse files
committed
fix python 3.9 compat
1 parent 9b96f04 commit e4b3758

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arcade/gui/experimental/focus.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class UIFocusMixin(UIWidget):
110110

111111
_focusable_widgets = ListProperty[UIWidget]()
112112
_focused = Property(0)
113-
_interacting: UIWidget | None = None
113+
_interacting: Optional[UIWidget] = None
114114

115115
_debug = Property(False)
116116

@@ -199,7 +199,7 @@ def _ensure_focused_property(self):
199199
else:
200200
widget.focused = False
201201

202-
def _get_focused_widget(self) -> UIWidget | None:
202+
def _get_focused_widget(self) -> Optional[UIWidget]:
203203
if len(self._focusable_widgets) == 0:
204204
return None
205205

@@ -218,7 +218,7 @@ def _walk_widgets(cls, root: UIWidget):
218218
yield child
219219
yield from cls._walk_widgets(child)
220220

221-
def detect_focusable_widgets(self, root: UIWidget | None = None):
221+
def detect_focusable_widgets(self, root: Optional[UIWidget] = None):
222222
"""Automatically detect focusable widgets."""
223223
if root is None:
224224
root = self

0 commit comments

Comments
 (0)