22Mock GPIO module for using with the tests.
33"""
44
5- from typing import Any , Callable , Dict , Iterable , List , Optional
5+ from typing import Callable , Dict , Iterable , List , Optional
66from unittest .mock import Mock
77
88from ...types import ConfigType , PinType
@@ -39,20 +39,20 @@ def __init__(self, config: ConfigType):
3939
4040 super ().__init__ (config )
4141 self .interrupt_callbacks : Dict [
42- PinType , Callable [[ List [ Any ], Dict [ Any , Any ]] , None ]
42+ PinType , Callable [... , None ]
4343 ] = {}
4444
4545 def setup_interrupt_callback (
4646 self ,
4747 pin : PinType ,
4848 edge : InterruptEdge ,
4949 in_conf : ConfigType ,
50- callback : Callable [[ List [ Any ], Dict [ Any , Any ]] , None ],
50+ callback : Callable [... , None ],
5151 ) -> None :
5252 self .interrupt_callbacks [pin ] = callback
5353
5454 def setup_module (self ) -> None :
55- return super ().setup_module ()
55+ return super ().setup_module () # type: ignore[safe-super]
5656
5757 def setup_pin (
5858 self ,
@@ -62,18 +62,19 @@ def setup_pin(
6262 pin_config : ConfigType ,
6363 initial : Optional [str ] = None ,
6464 ) -> None :
65- return super ().setup_pin (pin , direction , pullup , pin_config , initial = initial )
65+ return super ().setup_pin ( # type: ignore[safe-super]
66+ pin , direction , pullup , pin_config , initial = initial )
6667
6768 def setup_interrupt (
6869 self , pin : PinType , edge : InterruptEdge , in_conf : ConfigType
6970 ) -> None :
7071 return super ().setup_interrupt (pin , edge , in_conf )
7172
7273 def set_pin (self , pin : PinType , value : bool ) -> None :
73- return super ().set_pin (pin , value )
74+ return super ().set_pin (pin , value ) # type: ignore[safe-super]
7475
7576 def get_pin (self , pin : PinType ) -> bool :
76- return super ().get_pin (pin )
77+ return super ().get_pin (pin ) # type: ignore[safe-super]
7778
7879 def get_int_pins (self ) -> List [PinType ]:
7980 return super ().get_int_pins ()
0 commit comments