From a46cc068347aa32afccc9d00eef1057e257337af Mon Sep 17 00:00:00 2001 From: Ayush Anand <36472216+ayushanand18@users.noreply.github.com> Date: Sun, 8 Sep 2024 19:28:28 +0000 Subject: [PATCH] lint. fixes linting errors --- pyobis/checklist/checklist.py | 2 +- pyobis/obisutils.py | 6 +++--- pyobis/occurrences/occurrences.py | 12 +++++++++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pyobis/checklist/checklist.py b/pyobis/checklist/checklist.py index 2ad1294..24fadf1 100644 --- a/pyobis/checklist/checklist.py +++ b/pyobis/checklist/checklist.py @@ -63,7 +63,7 @@ def execute(self): "█" * int(len(out["results"]) * 100 / out["total"]), "." * (100 - int(len(out["results"]) * 100 / out["total"])), len(out["results"]), - ) + ), ) # now paginate until the response is null while True: diff --git a/pyobis/obisutils.py b/pyobis/obisutils.py index 0dfc97f..29540ee 100644 --- a/pyobis/obisutils.py +++ b/pyobis/obisutils.py @@ -12,10 +12,10 @@ # export logger, and setup basic configurations logger = logging.getLogger(__name__) logging.basicConfig( - encoding='utf-8', + encoding="utf-8", level=logging.INFO, - format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', - datefmt='%Y-%m-%d %H:%M:%S', + format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", + datefmt="%Y-%m-%d %H:%M:%S", ) diff --git a/pyobis/occurrences/occurrences.py b/pyobis/occurrences/occurrences.py index f4b96b9..369cae6 100644 --- a/pyobis/occurrences/occurrences.py +++ b/pyobis/occurrences/occurrences.py @@ -14,8 +14,8 @@ build_api_url, handle_arrint, handle_arrstr, - obis_baseurl, logger, + obis_baseurl, obis_GET, ) @@ -122,7 +122,7 @@ def execute(self, **kwargs): "." * (100 - int((i + 1) * 100 / size)), i, size, - ) + ), ) res = obis_GET( self.__url, @@ -144,7 +144,13 @@ def execute(self, **kwargs): # we have already fetched records as a set of 5000 records each time, # now we need to get remaining records from the total logger.info( - "{}[{}{}] {}/{}".format("Fetching: ", "\u2588" * 100, "." * 0, size, size), + "{}[{}{}] {}/{}".format( + "Fetching: ", + "\u2588" * 100, + "." * 0, + size, + size, + ), ) res = obis_GET( self.__url,