From ce2b2a88942d2037f00c1de56fa1271135603c54 Mon Sep 17 00:00:00 2001 From: Benny Thadikaran Date: Wed, 11 Oct 2023 00:01:48 +0530 Subject: [PATCH] - changes to src/examples/ann.py - Uppercased symbol names. - cast scrip code from int to str --- src/examples/ann.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/examples/ann.py b/src/examples/ann.py index e33ea28..be0f921 100755 --- a/src/examples/ann.py +++ b/src/examples/ann.py @@ -80,7 +80,7 @@ def mainHeading(string): @staticmethod def annHeading(sym, category): - return f"{Fmt.CYAN}{Fmt.BOLD}{sym} - {category}\n" + return f"{Fmt.CYAN}{Fmt.BOLD}{sym.upper()} - {category}\n" @staticmethod def annSubject(subject, headline): @@ -116,7 +116,7 @@ def hr(): with BSE() as bse: - if not symList is None: + if symList: for sym in symList: code = bse.getScripCode(sym) watchlist[code] = sym @@ -130,7 +130,7 @@ def hr(): text = '' for ann in annList: - code = ann['SCRIP_CD'] + code = str(ann['SCRIP_CD']) if not (code in watchlist and ann['CATEGORYNAME']): continue