@@ -116,12 +116,13 @@ async def add_listener(self, channel, callback):
116116 """Add a listener for Postgres notifications.
117117
118118 :param str channel: Channel to listen on.
119+
119120 :param callable callback:
120- A callable receiving the following arguments:
121- **connection**: a Connection the callback is registered with;
122- **pid**: PID of the Postgres server that sent the notification;
123- **channel**: name of the channel the notification was sent to;
124- **payload**: the payload.
121+ A callable receiving the following arguments:
122+ **connection**: a Connection the callback is registered with;
123+ **pid**: PID of the Postgres server that sent the notification;
124+ **channel**: name of the channel the notification was sent to;
125+ **payload**: the payload.
125126 """
126127 self ._check_open ()
127128 if channel not in self ._listeners :
@@ -245,7 +246,7 @@ async def executemany(self, command: str, args,
245246 ... ''', [(1, 2, 3), (4, 5, 6)])
246247
247248 :param command: Command to execute.
248- :args: An iterable containing sequences of arguments.
249+ :param args: An iterable containing sequences of arguments.
249250 :param float timeout: Optional timeout value in seconds.
250251 :return None: This method discards the results of the operations.
251252
@@ -713,43 +714,52 @@ async def connect(dsn=None, *,
713714
714715 Returns a new :class:`~asyncpg.connection.Connection` object.
715716
716- :param dsn: Connection arguments specified using as a single string in the
717- following format:
718- ``postgres://user:pass@host:port/database?option=value``
717+ :param dsn:
718+ Connection arguments specified using as a single string in the
719+ following format:
720+ ``postgres://user:pass@host:port/database?option=value``
719721
720- :param host: database host address or a path to the directory containing
721- database server UNIX socket (defaults to the default UNIX
722- socket, or the value of the ``PGHOST`` environment variable ,
723- if set).
722+ :param host:
723+ database host address or a path to the directory containing
724+ database server UNIX socket (defaults to the default UNIX socket ,
725+ or the value of the ``PGHOST`` environment variable, if set).
724726
725- :param port: connection port number (defaults to ``5432``, or the value of
726- the ``PGPORT`` environment variable, if set)
727+ :param port:
728+ connection port number (defaults to ``5432``, or the value of
729+ the ``PGPORT`` environment variable, if set)
727730
728- :param user: the name of the database role used for authentication
729- (defaults to the name of the effective user of the process
730- making the connection, or the value of ``PGUSER`` environment
731- variable, if set)
731+ :param user:
732+ the name of the database role used for authentication
733+ (defaults to the name of the effective user of the process
734+ making the connection, or the value of ``PGUSER`` environment
735+ variable, if set)
732736
733- :param database: the name of the database (defaults to the value of
734- ``PGDATABASE`` environment variable, if set.)
737+ :param database:
738+ the name of the database (defaults to the value of ``PGDATABASE``
739+ environment variable, if set.)
735740
736- :param password: password used for authentication
741+ :param password:
742+ password used for authentication
737743
738- :param loop: An asyncio event loop instance. If ``None``, the default
739- event loop will be used.
744+ :param loop:
745+ An asyncio event loop instance. If ``None``, the default
746+ event loop will be used.
740747
741- :param float timeout: connection timeout in seconds.
748+ :param float timeout:
749+ connection timeout in seconds.
742750
743- :param int statement_cache_size: the size of prepared statement LRU cache.
744- Pass ``0`` to disable the cache.
751+ :param int statement_cache_size:
752+ the size of prepared statement LRU cache. Pass ``0`` to
753+ disable the cache.
745754
746755 :param int max_cached_statement_lifetime:
747756 the maximum time in seconds a prepared statement will stay
748757 in the cache. Pass ``0`` to allow statements be cached
749758 indefinitely.
750759
751- :param float command_timeout: the default timeout for operations on
752- this connection (the default is no timeout).
760+ :param float command_timeout:
761+ the default timeout for operations on this connection
762+ (the default is no timeout).
753763
754764 :return: A :class:`~asyncpg.connection.Connection` instance.
755765
0 commit comments