From d91fd4e3cac4082e0020b73d5dc7236e779c1f30 Mon Sep 17 00:00:00 2001 From: Kartheek Gottipati Date: Sun, 26 Mar 2023 21:16:46 -0400 Subject: [PATCH] Avoid using mutable default --- neptune-python-utils/neptune_python_utils/endpoints.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/neptune-python-utils/neptune_python_utils/endpoints.py b/neptune-python-utils/neptune_python_utils/endpoints.py index cd97a587..efab8d29 100644 --- a/neptune-python-utils/neptune_python_utils/endpoints.py +++ b/neptune-python-utils/neptune_python_utils/endpoints.py @@ -135,8 +135,11 @@ def __proxied_neptune_endpoint_url(self): return '{}://{}:{}/{}'.format(self.protocol, self.neptune_endpoint, self.neptune_port, self.suffix) - def prepare_request(self, method='GET', payload=None, querystring={}, headers={}): - + def prepare_request(self, method='GET', payload=None, querystring=None, headers=None): + + querystring = querystring or {} + headers = headers or {} + def get_headers(): service = 'neptune-db'