urazakgul / isyatirimhisse

https://pypi.org/project/isyatirimhisse/
MIT License
101 stars 14 forks source link

Added decoration #6

Closed Brigade45 closed 1 year ago

Brigade45 commented 1 year ago

fetch_financials() içinde string'i datetime'a dönüşüm yapıyordu. Bunu decoration ile çözmemiz daha doğru olur.

urazakgul commented 1 year ago

Testlerde hata aldım.

FAILED fetch_financials_test.py::test_fetch_data_case_2 - KeyError: 'Type' FAILED fetch_financials_test.py::test_fetch_data_case_3 - KeyError: 'Type' FAILED fetch_financials_test.py::test_fetch_data_case_5 - KeyError: 'Type'

Brigade45 commented 1 year ago

Evet şuan denedim geçemedi. Tek symbol yollarsak problem yok, list olarak gönderildiğinde yapıyor. Biraz denemeler yaptım ilginç ancak

desired_dates = []

while start_period <= end_period:
    quarter = (start_period.month - 1) // 3 + 1
    desired_dates.append(datetime(start_period.year, quarter * 3, 1).date())
    start_period += relativedelta(months=3)

bu kısımı for smy in symbol: ün dışında çalıştırırsak problem kalkıyor.

urazakgul commented 1 year ago

Tamamdır, teşekkürler.