-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Delay/Optimize Imports #6532
base: develop
Are you sure you want to change the base?
Conversation
@field_validator("asset", mode="before", check_fields=False) | ||
@classmethod | ||
def to_lower(cls, v: Optional[str]) -> Optional[str]: | ||
"""Convert field to lowercase.""" | ||
return v.lower() if v else v | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are defined choices for this, and it's better to avoid computed fields in the standard models unless they are really necessary. Honestly, could remove the endpoint entirely as Nasdaq Data Link has seemingly stopped updating the free data sets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Why?:
What?:
Impact:
Faster import times.
There should be no change, from a user's perspective, in operation.
Fundamentally changes the code style to incorporate this pattern.
Testing Done:
Before:
After:
Additional Info:
finvizfinance
dropped Python 3.8 support and the OpenBB lock files have not been updated in this PR to reflect our dropping of 3.8historical_dividends
from yFinance; this is broken both in the yFinance package and also directly on the Yahoo Finance website.