Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions adafruit_motor/servo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
try:
from typing import Optional, Type
from types import TracebackType

# pylint: disable-msg=unused-import
from pwmio import PWMOut
except (ImportError, NotImplementedError):
pass
Expand All @@ -33,7 +35,7 @@ class _BaseServo: # pylint: disable-msg=too-few-public-methods
:param int max_pulse: The maximum pulse length of the servo in microseconds."""

def __init__(
self, pwm_out: PWMOut, *, min_pulse: int = 750, max_pulse: int = 2250
self, pwm_out: "PWMOut", *, min_pulse: int = 750, max_pulse: int = 2250
) -> None:
self._pwm_out = pwm_out
self.set_pulse_width_range(min_pulse, max_pulse)
Expand Down Expand Up @@ -99,7 +101,7 @@ class Servo(_BaseServo):

def __init__(
self,
pwm_out: PWMOut,
pwm_out: "PWMOut",
*,
actuation_range: int = 180,
min_pulse: int = 750,
Expand Down