diff options
| -rw-r--r-- | lirc/client.py | 17 | ||||
| -rw-r--r-- | lirc/connection/abstract_connection.py | 6 | ||||
| -rw-r--r-- | lirc/connection/lircd_connection.py | 8 |
3 files changed, 20 insertions, 11 deletions
diff --git a/lirc/client.py b/lirc/client.py index f947427..e97ebc4 100644 --- a/lirc/client.py +++ b/lirc/client.py @@ -102,15 +102,15 @@ class Client: """ Send an lircd SEND_STOP command. + The remote and key default to the remote and key + last used with send_start if they are not specified, + since the most likely use case is sending a send_start + and then a send_stop. + Args: remote: The remote to stop. key: The key to stop sending. - These default to the remote and key - last used with send_start if not specified, - since the most likely use case is sending a - send_start and then a send_stop. - Raises: LircdCommandFailure: If the command fails. """ @@ -219,8 +219,8 @@ class Client: key: The key on the remote to simulate. repeat_count: The number of times to simulate the key press. keycode: lircd(8) describes this option as a 16 hexadecimal digit - number encoding of the IR signal. However, it says it is depreciated - and should be ignored. + number encoding of the IR signal. However, it says it is depreciated + and should be ignored. Raises: LircdCommandFailure: If the command fails. @@ -235,8 +235,11 @@ class Client: Example: import lirc + c = lirc.Client() + c.set_transmitters(1) + c.set_transmitters([1,3,5]) Args: diff --git a/lirc/connection/abstract_connection.py b/lirc/connection/abstract_connection.py index ff3eae1..cb967ee 100644 --- a/lirc/connection/abstract_connection.py +++ b/lirc/connection/abstract_connection.py @@ -3,6 +3,12 @@ from typing import Union class AbstractConnection(ABC): + """ + Presents the interface for what we want + a connection to look like and any base + methods it should have. + """ + @abstractmethod def connect(self) -> None: pass diff --git a/lirc/connection/lircd_connection.py b/lirc/connection/lircd_connection.py index 200dec9..6d6a662 100644 --- a/lirc/connection/lircd_connection.py +++ b/lirc/connection/lircd_connection.py @@ -60,7 +60,7 @@ class LircdConnection(AbstractConnection): Raises: LircdConnectionError: If the address is invalid or lircd - is not running. + is not running. """ try: self.__socket.connect(self.__address) @@ -120,11 +120,11 @@ class LircdConnection(AbstractConnection): Raises: TimeoutError: If we are not able to grab data from - the socket in a specified amount of time (the initial - timeout time on initialization). + the socket in a specified amount of time (the initial + timeout time on initialization). LircdSocketError: If some other error happened when - trying to read from the socket. + trying to read from the socket. Returns: A line from the lircd socket. |