Skip to content

Commit

Permalink
Merge pull request #60 from FoamyGuy/pwmio_types_str
Browse files Browse the repository at this point in the history
string type annotations
  • Loading branch information
FoamyGuy committed Dec 28, 2021
2 parents fefb7ad + f032a39 commit 7c6a9ff
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 7c6a9ff

Please sign in to comment.