Skip to content

Commit 7c6a9ff

Browse files
authored
Merge pull request #60 from FoamyGuy/pwmio_types_str
string type annotations
2 parents fefb7ad + f032a39 commit 7c6a9ff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

adafruit_motor/servo.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
try:
1616
from typing import Optional, Type
1717
from types import TracebackType
18+
19+
# pylint: disable-msg=unused-import
1820
from pwmio import PWMOut
1921
except (ImportError, NotImplementedError):
2022
pass
@@ -33,7 +35,7 @@ class _BaseServo: # pylint: disable-msg=too-few-public-methods
3335
:param int max_pulse: The maximum pulse length of the servo in microseconds."""
3436

3537
def __init__(
36-
self, pwm_out: PWMOut, *, min_pulse: int = 750, max_pulse: int = 2250
38+
self, pwm_out: "PWMOut", *, min_pulse: int = 750, max_pulse: int = 2250
3739
) -> None:
3840
self._pwm_out = pwm_out
3941
self.set_pulse_width_range(min_pulse, max_pulse)
@@ -99,7 +101,7 @@ class Servo(_BaseServo):
99101

100102
def __init__(
101103
self,
102-
pwm_out: PWMOut,
104+
pwm_out: "PWMOut",
103105
*,
104106
actuation_range: int = 180,
105107
min_pulse: int = 750,

0 commit comments

Comments
 (0)