Skip to content

Commit 844ce74

Browse files
committed
Reformatting via pre-commit
1 parent ee4a2ac commit 844ce74

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

adafruit_motor/motor.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,10 @@ def decay_mode(self, mode: int = FAST_DECAY):
116116
def __enter__(self):
117117
return self
118118

119-
def __exit__(self, exception_type: Optional[Type[type]], exception_value: Optional[BaseException], traceback: Optional[TracebackType]):
119+
def __exit__(
120+
self,
121+
exception_type: Optional[Type[type]],
122+
exception_value: Optional[BaseException],
123+
traceback: Optional[TracebackType],
124+
):
120125
self.throttle = None

adafruit_motor/servo.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,14 @@ class Servo(_BaseServo):
9393
Test carefully to find the safe minimum and maximum.
9494
"""
9595

96-
def __init__(self, pwm_out: PWMOut, *, actuation_range: int = 180, min_pulse: int = 750, max_pulse: int = 2250):
96+
def __init__(
97+
self,
98+
pwm_out: PWMOut,
99+
*,
100+
actuation_range: int = 180,
101+
min_pulse: int = 750,
102+
max_pulse: int = 2250
103+
):
97104
super().__init__(pwm_out, min_pulse=min_pulse, max_pulse=max_pulse)
98105
self.actuation_range = actuation_range
99106
"""The physical range of motion of the servo in degrees."""
@@ -141,5 +148,10 @@ def throttle(self, value: float):
141148
def __enter__(self):
142149
return self
143150

144-
def __exit__(self, exception_type: Optional[Type[type]], exception_value: Optional[BaseException], traceback: Optional[TracebackType]):
151+
def __exit__(
152+
self,
153+
exception_type: Optional[Type[type]],
154+
exception_value: Optional[BaseException],
155+
traceback: Optional[TracebackType],
156+
):
145157
self.throttle = 0

adafruit_motor/stepper.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,15 @@ class StepperMotor:
8686
:param microsteps: set to `None`
8787
"""
8888

89-
def __init__(self, ain1: Union[PWMOut, DigitalInOut], ain2: Union[PWMOut, DigitalInOut], bin1: Union[PWMOut, DigitalInOut], bin2: Union[PWMOut, DigitalInOut], *, microsteps: Optional[int] = 16):
89+
def __init__(
90+
self,
91+
ain1: Union[PWMOut, DigitalInOut],
92+
ain2: Union[PWMOut, DigitalInOut],
93+
bin1: Union[PWMOut, DigitalInOut],
94+
bin2: Union[PWMOut, DigitalInOut],
95+
*,
96+
microsteps: Optional[int] = 16
97+
):
9098
if microsteps is None:
9199
#
92100
# Digital IO Pins

0 commit comments

Comments
 (0)