Skip to content

Commit 7f00c4c

Browse files
committed
Improve Effect and Pause docstrings
* Change @Property docstrings to read like variables * Remove unnecessary docstrings for __repr__() methods * Shorten class docstrings #9 (comment)
1 parent 5d929cb commit 7f00c4c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

adafruit_drv2605.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,21 +236,21 @@ def use_LRM(self):
236236

237237

238238
class Effect:
239-
"""Class for adding an effect to the DRV2605 waveform sequence."""
239+
"""DRV2605 waveform sequence effect."""
240240
def __init__(self, effect_id):
241241
self._effect_id = 0
242242
# pylint: disable=invalid-name
243243
self.id = effect_id
244244

245245
@property
246246
def raw_value(self):
247-
"""Return the raw effect ID."""
247+
"""Raw effect ID."""
248248
return self._effect_id
249249

250250
@property
251251
# pylint: disable=invalid-name
252252
def id(self):
253-
"""Return the effect ID."""
253+
"""Effect ID."""
254254
return self._effect_id
255255

256256
@id.setter
@@ -262,7 +262,6 @@ def id(self, effect_id):
262262
self._effect_id = effect_id
263263

264264
def __repr__(self):
265-
"""Return a string representation of the Effect class."""
266265
return "{}({})".format(type(self).__qualname__, self.id)
267266

268267

@@ -278,7 +277,7 @@ def __init__(self, duration):
278277

279278
@property
280279
def raw_value(self):
281-
"""Return the raw pause duration."""
280+
"""Raw pause duration."""
282281
return self._duration
283282

284283
@property
@@ -294,7 +293,6 @@ def duration(self, duration):
294293
self._duration = 0x80 | duration
295294

296295
def __repr__(self):
297-
"""Return a string representation of the Pause class."""
298296
return "{}({})".format(type(self).__qualname__, self.duration)
299297

300298

0 commit comments

Comments
 (0)