Skip to content
Snippets Groups Projects

Resolve "Timeout value defaults should be `0`"

1 file
+ 3
3
Compare changes
  • Side-by-side
  • Inline
+ 3
3
@@ -184,7 +184,7 @@ class PostGISDatabase(AbstractDatabase):
Username for the database connection.
password (str):
Password for the database connection.
timeout (int, optional, default: None):
timeout (int, optional, default: 0):
Timeout for SQL queries in milliseconds.
itersize (int, optional, default: 10000):
Number of rows fetched from the server at one call.
@@ -211,7 +211,7 @@ class PostGISDatabase(AbstractDatabase):
"""
def __init__(
self, host, dbname, port, username, password, timeout: int = None, itersize: int = 10000
self, host, dbname, port, username, password, timeout: int = 0, itersize: int = 10000
):
super().__init__()
self.host = host
@@ -219,7 +219,7 @@ class PostGISDatabase(AbstractDatabase):
self.port = port
self.username = username
self.password = password
self.timeout = int(timeout) if timeout is not None else None
self.timeout = int(timeout)
self.itersize = int(itersize)
def connect(self, timeout: int = None):
Loading