From e391d9542506be9fe9b954875e31bfeda1627419 Mon Sep 17 00:00:00 2001 From: Enrico Bono Date: Thu, 24 Aug 2023 21:48:46 +0200 Subject: [PATCH 1/8] 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 --- aiosu/models/common.py | 2 +- aiosu/models/event.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/aiosu/models/common.py b/aiosu/models/common.py index c911823..9bbb76e 100644 --- a/aiosu/models/common.py +++ b/aiosu/models/common.py @@ -46,7 +46,7 @@ class Achievement(BaseModel): id: int name: str slug: str - desciption: str + description: str # typo desciption grouping: str icon_url: str mode: Gamemode diff --git a/aiosu/models/event.py b/aiosu/models/event.py index 3a6b96f..53ffe07 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 # typo achievment user: Optional[EventUser] = None beatmap: Optional[EventBeatmap] = None beatmapset: Optional[EventBeatmapset] = None @@ -74,3 +74,4 @@ class Event(BaseModel): rank: Optional[int] = None mode: Optional[Gamemode] = None score_rank: Optional[str] = Field(default=None, alias="scoreRank") + From 2ad8cbb6ccac7b0c65025a6e2a1db6f220debb4d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 20:01:24 +0000 Subject: [PATCH 2/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- aiosu/models/common.py | 2 +- aiosu/models/event.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/aiosu/models/common.py b/aiosu/models/common.py index 9bbb76e..22f9ba7 100644 --- a/aiosu/models/common.py +++ b/aiosu/models/common.py @@ -46,7 +46,7 @@ class Achievement(BaseModel): id: int name: str slug: str - description: str # typo desciption + description: str # typo desciption grouping: str icon_url: str mode: Gamemode diff --git a/aiosu/models/event.py b/aiosu/models/event.py index 53ffe07..5c2b50f 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 - achievement: Optional[Achievement] = None # typo achievment + achievement: Optional[Achievement] = None # typo achievment user: Optional[EventUser] = None beatmap: Optional[EventBeatmap] = None beatmapset: Optional[EventBeatmapset] = None @@ -74,4 +74,3 @@ class Event(BaseModel): rank: Optional[int] = None mode: Optional[Gamemode] = None score_rank: Optional[str] = Field(default=None, alias="scoreRank") - From c50b394f7c5bf95e62b235758851a83695a747d6 Mon Sep 17 00:00:00 2001 From: Enrico Bono Date: Thu, 24 Aug 2023 22:13:54 +0200 Subject: [PATCH 3/8] Fixed: Achievement class parameter mode is a optional Field, possible can be null. Example is the achievement: Autocreation that has a gamemode of null --- .gitignore | 3 ++- .pre-commit-config.yaml | 2 +- aiosu/models/common.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5f53442..375fd58 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,8 @@ share/python-wheels/ .installed.cfg *.egg MANIFEST - +.gitigonre +.pre-commit-config.yaml # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4f0d15b..bbac3ea 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,4 +42,4 @@ repos: - id: poetry-check default_language_version: - python: python3.9 + python: python3.11 diff --git a/aiosu/models/common.py b/aiosu/models/common.py index 22f9ba7..540dd2d 100644 --- a/aiosu/models/common.py +++ b/aiosu/models/common.py @@ -49,7 +49,7 @@ class Achievement(BaseModel): description: str # typo desciption grouping: str icon_url: str - mode: Gamemode + mode: Optional[Gamemode] = None ordering: int instructions: Optional[str] = None From 97bac22108bcf56716232295571385e0a90df76c Mon Sep 17 00:00:00 2001 From: NiceAesth <8437201+NiceAesth@users.noreply.github.com> Date: Fri, 25 Aug 2023 16:45:46 +0300 Subject: [PATCH 4/8] chore: remove unrelated changes in .gitignore --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index 375fd58..d612bb9 100644 --- a/.gitignore +++ b/.gitignore @@ -26,8 +26,6 @@ share/python-wheels/ .installed.cfg *.egg MANIFEST -.gitigonre -.pre-commit-config.yaml # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. From bb1aea34270aaaaed6a5281d193e40b928ac5aab Mon Sep 17 00:00:00 2001 From: NiceAesth <8437201+NiceAesth@users.noreply.github.com> Date: Fri, 25 Aug 2023 16:46:07 +0300 Subject: [PATCH 5/8] chore: revert unrelated change --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bbac3ea..4f0d15b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,4 +42,4 @@ repos: - id: poetry-check default_language_version: - python: python3.11 + python: python3.9 From e0dbe07d72359f7347d69a4b57c9b75092366933 Mon Sep 17 00:00:00 2001 From: NiceAesth <8437201+NiceAesth@users.noreply.github.com> Date: Fri, 25 Aug 2023 16:46:51 +0300 Subject: [PATCH 6/8] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d612bb9..5f53442 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ share/python-wheels/ .installed.cfg *.egg MANIFEST + # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. From ba3930c07e34238c30b9697cfd572cc4b39b50eb Mon Sep 17 00:00:00 2001 From: NiceAesth <8437201+NiceAesth@users.noreply.github.com> Date: Fri, 25 Aug 2023 16:47:17 +0300 Subject: [PATCH 7/8] chore: fix pr --- aiosu/models/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aiosu/models/common.py b/aiosu/models/common.py index 540dd2d..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 - description: str # typo desciption + description: str grouping: str icon_url: str - mode: Optional[Gamemode] = None ordering: int + mode: Optional[Gamemode] = None instructions: Optional[str] = None From 0b2e43ee62310218b8d9a8f2519c8e2a0998c414 Mon Sep 17 00:00:00 2001 From: NiceAesth <8437201+NiceAesth@users.noreply.github.com> Date: Fri, 25 Aug 2023 16:47:44 +0300 Subject: [PATCH 8/8] chore: fix pr --- aiosu/models/event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiosu/models/event.py b/aiosu/models/event.py index 5c2b50f..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 - achievement: Optional[Achievement] = None # typo achievment + achievement: Optional[Achievement] = None user: Optional[EventUser] = None beatmap: Optional[EventBeatmap] = None beatmapset: Optional[EventBeatmapset] = None