Skip to content

Commit

Permalink
fix ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
ValueRaider committed Aug 18, 2024
1 parent 60c45d6 commit 0eda8ce
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions yfinance/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@
from __future__ import print_function

import json as _json
import re
import warnings
from io import StringIO
from typing import Optional, Union
from urllib.parse import quote as urlencode

import pandas as pd
import pytz
import requests

from . import utils, cache
Expand Down Expand Up @@ -612,13 +610,13 @@ def get_ticker_tz():
# Try to remap all ambiguous timezone values:
tzinfo['TZ'] = tzinfo['TZ'].str.replace('BST', 'Europe/London')
tzinfo['TZ'] = tzinfo['TZ'].str.replace('GMT', 'Europe/London')
if not '.' in self.ticker:
if '.' not in self.ticker:
tzinfo['TZ'] = tzinfo['TZ'].str.replace('EST', 'America/New_York')
elif self.ticker.endswith(".AX"):
tzinfo['TZ'] = tzinfo['TZ'].str.replace('EST', 'Australia/Sydney')
tzinfo['TZ'] = tzinfo['TZ'].str.replace('MST', 'America/Denver')
tzinfo['TZ'] = tzinfo['TZ'].str.replace('PST', 'America/Los_Angeles')
if not '.' in self.ticker:
if'.' not in self.ticker:
tzinfo['TZ'] = tzinfo['TZ'].str.replace('CST', 'America/Chicago')
else:
# Revisit if Cuba get a stock exchange
Expand Down

0 comments on commit 0eda8ce

Please sign in to comment.