From a11cd95faa0c85fb46c1e8a2c4f9a06601882107 Mon Sep 17 00:00:00 2001 From: Ravencentric <78981416+Ravencentric@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:37:39 +0530 Subject: [PATCH] fix: make some args kw only --- src/pyanilist/_client.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pyanilist/_client.py b/src/pyanilist/_client.py index 9559e0b..55cc6ed 100644 --- a/src/pyanilist/_client.py +++ b/src/pyanilist/_client.py @@ -34,7 +34,7 @@ class AniList: - def __init__(self, api_url: str = "https://graphql.anilist.co", client: Client | None = None) -> None: + def __init__(self, api_url: str = "https://graphql.anilist.co", *, client: Client | None = None) -> None: """ AniList API client. @@ -315,7 +315,7 @@ def get_media( return Media.model_validate(remove_null_fields(media)) def get_recommendations( - self, media: int | str | Media, sort: Iterable[RecommendationSort] | RecommendationSort | None = None + self, media: int | str | Media, *, sort: Iterable[RecommendationSort] | RecommendationSort | None = None ) -> Iterator[Media]: """ Retrieve recommended media based on a given `Media` object or ID. @@ -377,6 +377,7 @@ def get_relations(self, media: int | str | Media) -> Iterator[RelatedMedia]: def get_studios( self, media: int | str | Media, + *, sort: Iterable[StudioSort] | StudioSort | None = None, is_main: bool | None = None, ) -> Iterator[Studio]: @@ -420,6 +421,7 @@ def get_studios( def get_staffs( self, media: int | str | Media, + *, sort: Iterable[StaffSort] | StaffSort | None = None, ) -> Iterator[Staff]: """ @@ -457,6 +459,7 @@ def get_staffs( def get_airing_schedule( self, media: int | str | Media, + *, not_yet_aired: bool | None = None, ) -> Iterator[AiringSchedule]: """ @@ -488,6 +491,7 @@ def get_airing_schedule( def get_characters( self, media: int | str | Media, + *, sort: Iterable[CharacterSort] | CharacterSort | None = None, role: CharacterRole | None = None, ) -> Iterator[Character]: