From 3892ef5a709ee94b8683611087323fc2e5addefb Mon Sep 17 00:00:00 2001 From: Austen Lacy Date: Tue, 27 Apr 2021 14:09:58 -0400 Subject: [PATCH] use named parameters with Cursor and Connection objects --- pydruid/db/api.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/pydruid/db/api.py b/pydruid/db/api.py index 86b64e5e..4d1bd670 100644 --- a/pydruid/db/api.py +++ b/pydruid/db/api.py @@ -37,17 +37,17 @@ def connect( context = context or {} return Connection( - host, - port, - path, - scheme, - user, - password, - context, - header, - ssl_verify_cert, - ssl_client_cert, - proxies, + host=host, + port=port, + path=path, + scheme=scheme, + user=user, + password=password, + context=context, + header=header, + ssl_verify_cert=ssl_verify_cert, + ssl_client_cert=ssl_client_cert, + proxies=proxies, ) @@ -167,14 +167,14 @@ def cursor(self): """Return a new Cursor Object using the connection.""" cursor = Cursor( - self.url, - self.user, - self.password, - self.context, - self.header, - self.ssl_verify_cert, - self.ssl_client_cert, - self.proxies, + url=self.url, + user=self.user, + password=self.password, + context=self.context, + header=self.header, + ssl_verify_cert=self.ssl_verify_cert, + proxies=self.proxies, + ssl_client_cert=self.ssl_client_cert, ) self.cursors.append(cursor)