Skip to content

Commit cfb1c80

Browse files
committed
docs: Fix documentation for timeout parameter (int -> float)
1 parent 0f5f566 commit cfb1c80

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

asyncpg/connection.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ async def prepare(self, query, *, timeout=None):
128128
"""Create a *prepared statement* for the specified query.
129129
130130
:param str query: Text of the query to create a prepared statement for.
131-
:param int timeout: Optional timeout value in seconds.
131+
:param float timeout: Optional timeout value in seconds.
132132
133133
:return: A :class:`~prepared_stmt.PreparedStatement` instance.
134134
"""
@@ -140,7 +140,7 @@ async def fetch(self, query, *args, timeout=None) -> list:
140140
141141
:param str query: Query text.
142142
:param args: Query arguments.
143-
:param int timeout: Optional timeout value in seconds.
143+
:param float timeout: Optional timeout value in seconds.
144144
145145
:return list: A list of :class:`Record` instances.
146146
"""
@@ -156,7 +156,7 @@ async def fetchval(self, query, *args, column=0, timeout=None):
156156
:param args: Query arguments.
157157
:param int column: Numeric index within the record of the value to
158158
return (defaults to 0).
159-
:param int timeout: Optional timeout value in seconds.
159+
:param float timeout: Optional timeout value in seconds.
160160
If not specified, defaults to the value of
161161
``command_timeout`` argument to the ``Connection``
162162
instance constructor.
@@ -175,7 +175,7 @@ async def fetchrow(self, query, *args, timeout=None):
175175
176176
:param str query: Query text
177177
:param args: Query arguments
178-
:param int timeout: Optional timeout value in seconds.
178+
:param float timeout: Optional timeout value in seconds.
179179
180180
:return: The first row as a :class:`Record` instance.
181181
"""

asyncpg/prepared_stmt.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ async def fetch(self, *args, timeout=None):
103103
104104
:param str query: Query text
105105
:param args: Query arguments
106-
:param int timeout: Optional timeout value in seconds.
106+
:param float timeout: Optional timeout value in seconds.
107107
108108
:return: A list of :class:`Record` instances.
109109
"""
@@ -120,7 +120,7 @@ async def fetchval(self, *args, column=0, timeout=None):
120120
:param args: Query arguments.
121121
:param int column: Numeric index within the record of the value to
122122
return (defaults to 0).
123-
:param int timeout: Optional timeout value in seconds.
123+
:param float timeout: Optional timeout value in seconds.
124124
If not specified, defaults to the value of
125125
``command_timeout`` argument to the ``Connection``
126126
instance constructor.
@@ -141,7 +141,7 @@ async def fetchrow(self, *args, timeout=None):
141141
142142
:param str query: Query text
143143
:param args: Query arguments
144-
:param int timeout: Optional timeout value in seconds.
144+
:param float timeout: Optional timeout value in seconds.
145145
146146
:return: The first row as a :class:`Record` instance.
147147
"""

0 commit comments

Comments
 (0)