From ae96b54ac51d086002d864440d3ec7638419b9d0 Mon Sep 17 00:00:00 2001 From: Chris Schnaufer Date: Wed, 21 Sep 2022 11:16:18 -0700 Subject: [PATCH 1/2] Adding timeout for pylint --- betydb2geojson.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/betydb2geojson.py b/betydb2geojson.py index 66045f1..61ada67 100755 --- a/betydb2geojson.py +++ b/betydb2geojson.py @@ -60,7 +60,7 @@ def query_betydb_experiments(betydb_url: str = None) -> dict: url = betydb_url.rstrip('/') + '/api/v1/experiments' params = {'associations_mode': 'full_info', 'limit': 'none'} - req = requests.get(url, params=params) + req = requests.get(url, params=params, timeout=300) req.raise_for_status() return req.json() From f004ddd64ff3188038c28d9614283790ee5c8b75 Mon Sep 17 00:00:00 2001 From: Chris Schnaufer Date: Wed, 21 Sep 2022 11:26:19 -0700 Subject: [PATCH 2/2] Another pylint fix --- tests/compare_geojson.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/compare_geojson.py b/tests/compare_geojson.py index 5799322..1a3f983 100755 --- a/tests/compare_geojson.py +++ b/tests/compare_geojson.py @@ -42,7 +42,7 @@ def other_contents_match(val1, val2, key: str) -> bool: if isinstance(val1, str): logging.debug("HACK: other HERE WE HAVE A STRING!") if val1 != val2: - logging.error('Strings don''t match for key "%s"', key) + logging.error('Strings don\'t match for key "%s"', key) logging.error(' 1. %s', str(val1)) logging.error(' 2. %s', str(val2)) return False @@ -82,7 +82,7 @@ def other_contents_match(val1, val2, key: str) -> bool: logging.debug(" hash2: %s", str(cur_hash)) else: if not other_contents_match(sub_val1, sub_val2, key): - logging.error('Iterable contents index %d don''t match for key "%s"', idx, key) + logging.error('Iterable contents index %d don\'t match for key "%s"', idx, key) logging.error(' 1. %s', (str(sub_val1))) logging.error(' 2. %s', (str(sub_val2))) return False @@ -90,7 +90,7 @@ def other_contents_match(val1, val2, key: str) -> bool: # Check any hashes we may have for idx, _ in enumerate(hash1): if not hash1[idx] in hash2: - logging.error('Hashed iterable at index %d isn''t matched for key "%s"', hash1_src[idx][0], key) + logging.error('Hashed iterable at index %d isn\'t matched for key "%s"', hash1_src[idx][0], key) logging.error(' %s', hash1_src[idx][1]) return False hash2_diff = list(set(hash2) - set(hash1))