From 20ec28980a0a003cac408f6d8efcf4ef1c9c1ec8 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Fri, 29 Dec 2023 16:18:50 +0300 Subject: fix mypy issues --- gn3/llms/client.py | 2 +- gn3/llms/process.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gn3/llms/client.py b/gn3/llms/client.py index 41aa6b4..f205247 100644 --- a/gn3/llms/client.py +++ b/gn3/llms/client.py @@ -85,7 +85,7 @@ class GeneNetworkQAClient(Session): bib_info = bib_info.removesuffix('.txt') elif isinstance(bib_info, dict): # Format string bibliography information - bib_info = "{0}. ".format(bib_info.get('author', ''), + bib_info = "{0}.{1}.{2}.{3} ".format(bib_info.get('author', ''), bib_info.get('title', ''), bib_info.get('year', ''), bib_info.get('doi', '')) diff --git a/gn3/llms/process.py b/gn3/llms/process.py index 4220d7a..b8e7ded 100644 --- a/gn3/llms/process.py +++ b/gn3/llms/process.py @@ -30,7 +30,7 @@ def formatBibliographyInfo(bibInfo): bibInfo = bibInfo.removesuffix('.txt') elif isinstance(bibInfo, dict): # format string bibliography information - bibInfo = "{0}. ".format(bibInfo['author'], bibInfo['title'], bibInfo['year'], bibInfo['doi']) + bibInfo = "{0}.{1}.{2}.{3} ".format(bibInfo['author'], bibInfo['title'], bibInfo['year'], bibInfo['doi']) return bibInfo @@ -71,7 +71,7 @@ def getTaskIDFromResult(res): return result def negativeStatusMsg(res): - return 'Problems\n\tStatus code => {0}\n\tReason=> {res.reason}'.format(res.status_code, res.reason) + return 'Problems\n\tStatus code => {0}\n\tReason=> {1}'.format(res.status_code, res.reason) # mypy: ignore def filterResponseText(val): return json.loads(''.join([str(char) for char in val if char in string.printable])) -- cgit v1.2.3