Skip to content

Commit

Permalink
string type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
FoamyGuy committed Dec 27, 2021
1 parent fefb7ad commit f032a39
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 f032a39

Please sign in to comment.