Skip to content
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

Split get_score into get_score and get_lazer_score #251

Merged
merged 6 commits into from
Nov 2, 2024

Conversation

minisbett
Copy link
Contributor

@minisbett minisbett commented Oct 24, 2024

I'd suggest testing it in case i messed up somewhere

Self-check

  • The changes are tested with pre-commit
  • The changes pass unit testing with pytest
  • The changes pass mypy

@NiceAesth
Copy link
Owner

i didnt get a notif for this pr u should have told me abt it


:raises APIException: Contains status code and error message
:raises RefreshTokenExpiredError: If the client refresh token has expired
:return: Score data object
:rtype: aiosu.models.score.Score
"""
url = f"{self.base_url}/api/v2/scores/{mode}/{score_id}"
headers = {}
new_format = kwargs.pop("new_format", False)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the new_format logic should still remain in both methods to not break existing shit

this stuff should only be removed when the library fully switches to new api models

@@ -1761,37 +1761,47 @@ async def get_score(
self,
score_id: int,
mode: Gamemode,
**kwargs: Any,
) -> Union[Score, LazerScore]:
) -> Score:
r"""Gets data about a score.

:param score_id: The ID of the score
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:param score_id: The ID of the score
:param legacy_score_id: The ID of the score

potentially

@NiceAesth
Copy link
Owner

NiceAesth commented Nov 2, 2024

also needs a new test added ill probably handle that myself unless you want to try and do it

@NiceAesth NiceAesth enabled auto-merge (squash) November 2, 2024 12:57
@NiceAesth NiceAesth merged commit 14f49f2 into NiceAesth:master Nov 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants