fix typing error in stocks.py

#2
Files changed (1) hide show
  1. stocks.py +3 -3
stocks.py CHANGED
@@ -7,7 +7,7 @@ import pandas as pd
7
  class StockMarketAnalyzer:
8
  def __init__(
9
  self,
10
- market_data: dict[str, pd.DataFrame],
11
  sector: str = "NASDAQ",
12
  date_col: str = "Date",
13
  price_col: str = "Open",
@@ -69,7 +69,7 @@ class StockMarketAnalyzer:
69
  return stock_ratio > sector_ratio
70
 
71
 
72
- def load_stock_prices(files: Iterable[Path]) -> dict[str, pd.DataFrame]:
73
  """
74
  Load stock prices from CSV files into a dictionary of DataFrames.
75
 
@@ -78,7 +78,7 @@ def load_stock_prices(files: Iterable[Path]) -> dict[str, pd.DataFrame]:
78
  CSV files to load.
79
 
80
  Returns:
81
- dict[str, pd.DataFrame]: A dictionary where the keys are the company names
82
  (extracted from the file names) and the values are pandas DataFrames
83
  containing the stock prices for each company.
84
  """
 
7
  class StockMarketAnalyzer:
8
  def __init__(
9
  self,
10
+ market_data: Dict[str, pd.DataFrame],
11
  sector: str = "NASDAQ",
12
  date_col: str = "Date",
13
  price_col: str = "Open",
 
69
  return stock_ratio > sector_ratio
70
 
71
 
72
+ def load_stock_prices(files: Iterable[Path]) -> Dict[str, pd.DataFrame]:
73
  """
74
  Load stock prices from CSV files into a dictionary of DataFrames.
75
 
 
78
  CSV files to load.
79
 
80
  Returns:
81
+ Dict[str, pd.DataFrame]: A dictionary where the keys are the company names
82
  (extracted from the file names) and the values are pandas DataFrames
83
  containing the stock prices for each company.
84
  """