From 41d49bdc8d11430f2804b74de8a2bba745e3b95e Mon Sep 17 00:00:00 2001 From: Enrico Bono Date: Fri, 25 Aug 2023 15:49:48 +0200 Subject: [PATCH] fix: typos in models (#164) * Changed: event.py Fixed typo errors in Event(BaseModel) achievement: Optional[Achievement] = None # typo achievment and in common.py Achievement(BaseModel) description: str # typo desciption * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fixed: Achievement class parameter mode is a optional Field, possible can be null. Example is the achievement: Autocreation that has a gamemode of null * chore: remove unrelated changes in .gitignore * chore: revert unrelated change * Update .gitignore * chore: fix pr * chore: fix pr --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: NiceAesth <8437201+NiceAesth@users.noreply.github.com> --- aiosu/models/common.py | 4 ++-- aiosu/models/event.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aiosu/models/common.py b/aiosu/models/common.py index c911823..5895e7a 100644 --- a/aiosu/models/common.py +++ b/aiosu/models/common.py @@ -46,11 +46,11 @@ class Achievement(BaseModel): id: int name: str slug: str - desciption: str + description: str grouping: str icon_url: str - mode: Gamemode ordering: int + mode: Optional[Gamemode] = None instructions: Optional[str] = None diff --git a/aiosu/models/event.py b/aiosu/models/event.py index 3a6b96f..54b9b5e 100644 --- a/aiosu/models/event.py +++ b/aiosu/models/event.py @@ -65,7 +65,7 @@ class Event(BaseModel): type: EventType r"""Information on types: https://github.com/ppy/osu-web/blob/master/resources/assets/lib/interfaces/event-json.ts""" parse_error: Optional[bool] = None - achievment: Optional[Achievement] = None + achievement: Optional[Achievement] = None user: Optional[EventUser] = None beatmap: Optional[EventBeatmap] = None beatmapset: Optional[EventBeatmapset] = None