3030try :
3131 from typing import Optional , Union , Tuple , Any , List
3232 from fontio import FontProtocol
33+ from displayio import Group
3334except ImportError :
3435 pass
3536
@@ -189,7 +190,7 @@ def __init__(
189190
190191 self .label = label
191192
192- def _subclass_selected_behavior (self , value : Optional [ Any ] ) -> None :
193+ def _subclass_selected_behavior (self , value : bool ) -> None :
193194 if self ._selected :
194195 new_fill = self .selected_fill
195196 new_out = self .selected_outline
@@ -202,7 +203,7 @@ def _subclass_selected_behavior(self, value: Optional[Any]) -> None:
202203 self .body .outline = new_out
203204
204205 @property
205- def group (self ) -> "Button" :
206+ def group (self ) -> Group :
206207 """Return self for compatibility with old API."""
207208 print (
208209 "Warning: The group property is being deprecated. "
@@ -211,7 +212,7 @@ def group(self) -> "Button":
211212 )
212213 return self
213214
214- def contains (self , point : List [ int ]) -> bool :
215+ def contains (self , point : tuple [ int , int ]) -> bool :
215216 """Used to determine if a point is contained within a button. For example,
216217 ``button.contains(touch)`` where ``touch`` is the touch point on the screen will allow for
217218 determining that a button has been touched.
0 commit comments