MNT: deprecate round kwarg in Ergast methods (#890)#934
Open
divyanshrohatgi wants to merge 3 commits into
Open
MNT: deprecate round kwarg in Ergast methods (#890)#934divyanshrohatgi wants to merge 3 commits into
divyanshrohatgi wants to merge 3 commits into
Conversation
Collaborator
|
Thanks for your contribution again. This is a bigger diff than last time but the contents are broadly similar. Rest assured that reviewing this is on my todo list. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #920 (the get_event_by_round pilot). Applies the same
round -> round_number deprecation to the Ergast data request methods.
Part of #890.
Changes:
it's internal with no external callers.
deprecated keyword-only alias that emits a FutureWarning, and raise
ValueError if both are passed. get_lap_times / get_pit_stops also
raise ValueError if neither is passed (round was required there).
both passed case, and the neither passed case. Mocked so they don't
hit the API.
round= calls to round_number= so they don't trip the new warning.
get_sprint_results.
Left pyproject.toml / the A002 rule out of this on purpose
AI disclosure: used Claude for navigating the codebase and grammar review on this PR description. All code typed and reviewed by me.