A solution to this is to use a type hint for row as follows:
with open(infile, encoding='utf-8') as csvfile:
reader = csv.DictReader(csvfile) # Read CSV as a dictionary
for row in reader:
print(row)
row: dict[str, str] # type hint which specifies that row is a dict with string keys and values
symbol = row['SYMBOL']
print(symbol)