@@ -57,7 +57,9 @@ def tone(pin: Pin, frequency: float, duration: int = 1, length: float = 100) ->
5757 try :
5858 # pin with PWM
5959 # pylint: disable=no-member
60- with pwmio .PWMOut (pin , frequency = int (frequency ), variable_frequency = False ) as pwm :
60+ with pwmio .PWMOut (
61+ pin , frequency = int (frequency ), variable_frequency = False
62+ ) as pwm :
6163 pwm .duty_cycle = 0x8000
6264 time .sleep (duration )
6365 # pylint: enable=no-member
@@ -94,7 +96,9 @@ def bitWrite(x: int, n: int, b: int) -> int: # pylint: disable-msg=invalid-name
9496
9597
9698def shift_in (
97- data_pin : digitalio .DigitalInOut , clock : digitalio .DigitalInOut , msb_first : bool = True
99+ data_pin : digitalio .DigitalInOut ,
100+ clock : digitalio .DigitalInOut ,
101+ msb_first : bool = True ,
98102) -> int :
99103 """
100104 Shifts in a byte of data one bit at a time. Starts from either the LSB or
@@ -237,11 +241,13 @@ def value(self) -> Any:
237241 return self .iopin .value
238242
239243 @value .setter
240- def value (self , value : Any ) -> None : # pylint: disable-msg =no-self-use, unused-argument
244+ def value (self , value : Any ) -> None : # pylint: disable=no-self-use, unused-argument
241245 raise AttributeError ("Cannot set the value on a digital input." )
242246
243247
244- def map_range (x : float , in_min : float , in_max : float , out_min : float , out_max : float ) -> float :
248+ def map_range (
249+ x : float , in_min : float , in_max : float , out_min : float , out_max : float
250+ ) -> float :
245251 """
246252 Maps a number from one range to another.
247253 Note: This implementation handles values < in_min differently than arduino's map function does.
0 commit comments