]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 18 Jan 2025 00:00:22 +0000 (01:00 +0100)
committerRoland Häder <roland@mxchange.org>
Sat, 18 Jan 2025 00:00:22 +0000 (01:00 +0100)
- default None has pleased pylint due to no dangerous default but it woud
  have made some other code (logging length of it) more complex

fba/http/network.py

index 4b247c9cd86f51b62cf52ed47f3426574a372773..27490c131393fd3eec6254078ebe7cab37dbd524 100644 (file)
@@ -63,7 +63,7 @@ logging.basicConfig(level=logging.INFO)
 logger = logging.getLogger(__name__)
 #logger.setLevel(logging.DEBUG)
 
-def post_json_api(domain: str, path: str, data: str = "", headers: dict = None) -> dict:
+def post_json_api(domain: str, path: str, data: str = "", headers: dict = {}) -> dict:
     logger.debug("domain='%s',path='%s',data='%s',headers()=%d - CALLED!", domain, path, data, len(headers))
     domain_helper.raise_on(domain)
 
@@ -367,7 +367,7 @@ def fetch_url(url: str, headers: dict, timeout: tuple) -> requests.models.Respon
     logger.debug("response[]='%s' - EXIT!", type(response))
     return response
 
-def fetch_json_rows(hostname: str, path: str, headers: dict = None, rows_key: str = None):
+def fetch_json_rows(hostname: str, path: str, headers: dict = {}, rows_key: str = None):
     logger.debug("hostname='%s',path='%s',headers()=%d,rows_key='%s' - CALLED!", hostname, path, len(headers), rows_key)
 
     if not isinstance(hostname, str):