Skip to content

Commit 2fa3d24

Browse files
committed
Minor changes to docstrings
1 parent 05e36c2 commit 2fa3d24

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

docs/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Master
1414
The default and behavior so far has been to raise ``KeyError``. If set to
1515
``True``, the keycode will be set to the event code formatted as a hex number.
1616

17+
- Add ``InputDevice.set_absinfo()`` and ``InputDevice.get_absinfo()``.
18+
1719

1820
1.2.0 (Apr 7, 2019)
1921
====================

evdev/device.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def fn(self):
400400
return self.path
401401

402402
def get_absinfo(self, axis_num):
403-
"""
403+
'''
404404
Return current :class:`AbsInfo` for input device axis
405405
406406
Arguments
@@ -410,20 +410,14 @@ def get_absinfo(self, axis_num):
410410
411411
Example
412412
-------
413-
414413
>>> device.get_absinfo(ecodes.ABS_X)
415414
AbsInfo(value=1501, min=-32768, max=32767, fuzz=0, flat=128, resolution=0)
416-
417-
"""
415+
'''
418416
return AbsInfo(*_input.ioctl_EVIOCGABS(self.fd, axis_num))
419417

420418
def set_absinfo(self, axis_num, value=None, min=None, max=None, fuzz=None, flat=None, resolution=None):
421-
"""
422-
Set AbsInfo values for input device.
423-
424-
Only values set will be overwritten.
425-
426-
See :class:`AbsInfo` for more info about the arguments
419+
'''
420+
Update :class:`AbsInfo` values. Only specified values will be overwritten.
427421
428422
Arguments
429423
---------
@@ -437,9 +431,8 @@ def set_absinfo(self, axis_num, value=None, min=None, max=None, fuzz=None, flat=
437431
You can also unpack AbsInfo tuple that will overwrite all values
438432
439433
>>> device.set_absinfo(ecodes.ABS_Y, *AbsInfo(0, -2000, 2000, 0, 15, 0))
434+
'''
440435

441-
442-
"""
443436
cur_absinfo = self.get_absinfo(axis_num)
444437
new_absinfo = AbsInfo(value if value else cur_absinfo.value,
445438
min if min else cur_absinfo.min,

0 commit comments

Comments
 (0)