Skip to content

Commit

Permalink
Merge pull request #1654 from ranaroussi/fix/circular-import
Browse files Browse the repository at this point in the history
Fix circular import in utils.py
  • Loading branch information
ValueRaider authored Aug 5, 2023
2 parents 6c1e260 + 93a7ee6 commit e1f94ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions yfinance/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
from .scrapers.holders import Holders
from .scrapers.quote import Quote, FastInfo

_BASE_URL_ = 'https://query2.finance.yahoo.com'
_ROOT_URL_ = 'https://finance.yahoo.com'
from .const import _BASE_URL_, _ROOT_URL_


class TickerBase:
Expand Down
4 changes: 4 additions & 0 deletions yfinance/const.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
_BASE_URL_ = 'https://query2.finance.yahoo.com'
_ROOT_URL_ = 'https://finance.yahoo.com'

fundamentals_keys = {
'financials': ["TaxEffectOfUnusualItems", "TaxRateForCalcs", "NormalizedEBITDA", "NormalizedDilutedEPS",
Expand Down Expand Up @@ -113,3 +115,5 @@
"PaymentstoSuppliersforGoodsandServices", "ClassesofCashReceiptsfromOperatingActivities",
"OtherCashReceiptsfromOperatingActivities", "ReceiptsfromGovernmentGrants", "ReceiptsfromCustomers"]}



2 changes: 1 addition & 1 deletion yfinance/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from dateutil.relativedelta import relativedelta
from pytz import UnknownTimeZoneError

from .base import _BASE_URL_
from .const import _BASE_URL_

try:
import ujson as _json
Expand Down

0 comments on commit e1f94ed

Please sign in to comment.