From 58802badee803f9052e0a78a4fbc7a4acc1e7519 Mon Sep 17 00:00:00 2001 From: Alec Delaney Date: Mon, 30 May 2022 21:05:47 -0400 Subject: [PATCH 1/3] Add type for actuation_range --- adafruit_motor/servo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/adafruit_motor/servo.py b/adafruit_motor/servo.py index 2412efd..2517c5a 100644 --- a/adafruit_motor/servo.py +++ b/adafruit_motor/servo.py @@ -113,7 +113,10 @@ def __init__( ) -> None: super().__init__(pwm_out, min_pulse=min_pulse, max_pulse=max_pulse) self.actuation_range = actuation_range - """The physical range of motion of the servo in degrees.""" + """The physical range of motion of the servo in degrees. + + :type: float + """ self._pwm = pwm_out @property From 784e935672b9edc1f347a4c953f767e96bdbbb1c Mon Sep 17 00:00:00 2001 From: Alec Delaney Date: Mon, 30 May 2022 21:06:09 -0400 Subject: [PATCH 2/3] Remove depreciated use of InstanceAttributeDocumenter --- docs/conf.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index f936480..1b54210 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -85,18 +85,6 @@ # If this is True, todo emits a warning for each TODO entries. The default is False. todo_emit_warnings = True -# Avoid an `= None` on instance attributes with their own doc strings. -# Workaround from here: https://github.com/sphinx-doc/sphinx/issues/2044#issuecomment-285888160 -# -from sphinx.ext.autodoc import ClassLevelDocumenter, InstanceAttributeDocumenter - - -def iad_add_directive_header(self, sig): - ClassLevelDocumenter.add_directive_header(self, sig) - - -InstanceAttributeDocumenter.add_directive_header = iad_add_directive_header - # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for From 99311d0c6d007acdca00700b2ddeaeb1296834c4 Mon Sep 17 00:00:00 2001 From: Alec Delaney Date: Mon, 30 May 2022 21:07:34 -0400 Subject: [PATCH 3/3] Trim trailing whitespace --- adafruit_motor/servo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_motor/servo.py b/adafruit_motor/servo.py index 2517c5a..21056ca 100644 --- a/adafruit_motor/servo.py +++ b/adafruit_motor/servo.py @@ -114,7 +114,7 @@ def __init__( super().__init__(pwm_out, min_pulse=min_pulse, max_pulse=max_pulse) self.actuation_range = actuation_range """The physical range of motion of the servo in degrees. - + :type: float """ self._pwm = pwm_out