mirror of
https://gitlab.com/simple-stock-bots/simple-stock-bot.git
synced 2025-06-15 23:06:40 +00:00
fixed typing in file
This commit is contained in:
parent
4ed8c59828
commit
262ae7c534
@ -15,11 +15,13 @@ from cg_Crypto import cg_Crypto
|
||||
from MarketData import MarketData
|
||||
from Symbol import Coin, Stock, Symbol
|
||||
|
||||
from typing import Dict
|
||||
|
||||
|
||||
class Router:
|
||||
STOCK_REGEX = "(?:^|[^\\$])\\$([a-zA-Z.]{1,6})"
|
||||
CRYPTO_REGEX = "[$]{2}([a-zA-Z]{1,20})"
|
||||
trending_count = {}
|
||||
trending_count: Dict[str, float] = {}
|
||||
|
||||
def __init__(self):
|
||||
self.stock = MarketData()
|
||||
@ -61,7 +63,7 @@ class Router:
|
||||
"""
|
||||
schedule.run_pending()
|
||||
|
||||
symbols: List[Union[Stock, Symbol]] = []
|
||||
symbols: list[Symbol] = []
|
||||
stocks = set(re.findall(self.STOCK_REGEX, text))
|
||||
for stock in stocks:
|
||||
# Market data lacks tools to check if a symbol is valid.
|
||||
|
Loading…
x
Reference in New Issue
Block a user