-
Notifications
You must be signed in to change notification settings - Fork 900
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
refactor: use event classes in US-SPP parser #6553
base: master
Are you sure you want to change the base?
Conversation
parsers/US_SPP.py
Outdated
def fetch_historical_exchange( | ||
zone_key1: str, | ||
zone_key2: str, | ||
zone_key1: ZoneKey, | ||
zone_key2: ZoneKey, | ||
session: Session | None = None, | ||
target_datetime: datetime | None = None, | ||
logger: Logger = getLogger(__name__), | ||
) -> list: | ||
) -> list[dict[str, Any]]: | ||
filename = target_datetime.strftime("TieFlows_%b%Y.csv") | ||
file_url = f"{US_PROXY}/file-browser-api/download/historical-tie-flow?{HOST_PARAMETER}&path={filename}" |
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.
Not really part of your changes but I don't think the target datetime should be None here, type wise. Or it should be checked that it's not none before the filename is generated as .strftime
is not available on None
.
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.
Fixed both! Sorry it's been a while!
d021de5
to
ee6fe70
Compare
Issue
6011
Description
Use event classes in US-SPP parser
Preview
Double check
poetry run test_parser "zone_key"
pnpx prettier@2 --write .
andpoetry run format
in the top level directory to format my changes.