From f032a390f1a58d51ff2f1a44e00acace92b6bcbb Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 27 Dec 2021 14:43:41 -0600 Subject: [PATCH] string type annotations --- adafruit_motor/servo.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/adafruit_motor/servo.py b/adafruit_motor/servo.py index 9c8dbdd..594cd0c 100644 --- a/adafruit_motor/servo.py +++ b/adafruit_motor/servo.py @@ -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 @@ -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) @@ -99,7 +101,7 @@ class Servo(_BaseServo): def __init__( self, - pwm_out: PWMOut, + pwm_out: "PWMOut", *, actuation_range: int = 180, min_pulse: int = 750,