From a7337a5a4a9ca2376b392161e1caf871914b9b13 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 3 Nov 2021 14:25:52 -0700 Subject: pubmed harvester: explicit assertions to mark unreachable code paths --- python/fatcat_tools/harvest/pubmed.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python/fatcat_tools/harvest') diff --git a/python/fatcat_tools/harvest/pubmed.py b/python/fatcat_tools/harvest/pubmed.py index 118580db..d904144b 100644 --- a/python/fatcat_tools/harvest/pubmed.py +++ b/python/fatcat_tools/harvest/pubmed.py @@ -314,6 +314,7 @@ def ftpretr( time.sleep(retry_delay) else: return f.name + assert False, "Unreachable code branch" def ftpretr_via_http_proxy( @@ -348,6 +349,7 @@ def ftpretr_via_http_proxy( if i + 1 == max_retries: raise time.sleep(retry_delay) + assert False, "Unreachable code branch" def xmlstream(filename: str, tag: str, encoding: str = "utf-8") -> Generator[Any, Any, Any]: -- cgit v1.2.3