Skip to content

Commit

Permalink
- changes to src/examples/ann.py
Browse files Browse the repository at this point in the history
    - Uppercased symbol names.
    - cast scrip code from int to str
  • Loading branch information
BennyThadikaran committed Oct 10, 2023
1 parent de161f5 commit ce2b2a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/examples/ann.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ce2b2a8

Please sign in to comment.