From: Kaliko Jack Date: Fri, 8 May 2020 12:15:37 +0000 (+0200) Subject: Improved documentation X-Git-Tag: v0.5.0~10 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=79fd7d84fe8acbc03b857c4ff483db9c16a0c5b1;p=python-musicpd.git Improved documentation --- diff --git a/doc/source/doc.rst b/doc/source/doc.rst index f0205c5..60ae4fa 100644 --- a/doc/source/doc.rst +++ b/doc/source/doc.rst @@ -1,10 +1,10 @@ MPD client class ================= +.. autodata:: musicpd.CONNECTION_TIMEOUT + .. autoclass:: musicpd.MPDClient :members: - :noindex: - .. vim: spell spelllang=en diff --git a/musicpd.py b/musicpd.py index 58edf56..8c5bfc3 100644 --- a/musicpd.py +++ b/musicpd.py @@ -30,7 +30,8 @@ ERROR_PREFIX = "ACK " SUCCESS = "OK" NEXT = "list_OK" VERSION = '0.4.5' -CONNECTION_TIMEOUT = 5 # seconds before a tcp connection attempt times out +#: seconds before a tcp connection attempt times out +CONNECTION_TIMEOUT = 5 def iterator_wrapper(func): @@ -134,7 +135,11 @@ class MPDClient: True >>> cli.host == environ['MPD_HOST'].split('@')[1] True - >>> # cli.connect() will use host/port as set in MPD_HOST/MPD_PORT + >>> cli.connect() # will use host/port as set in MPD_HOST/MPD_PORT + + :ivar str host: host used with the current connection + :ivar str,int port: port used with the current connection + :ivar str pwd: password detected in ``MPD_HOST`` environment variable .. warning:: Instance attribute host/port/pwd