Skip to content

Commit

Permalink
fix: make some args kw only
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravencentric committed Nov 18, 2024
1 parent 6eef1db commit a11cd95
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pyanilist/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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]:
Expand Down Expand Up @@ -420,6 +421,7 @@ def get_studios(
def get_staffs(
self,
media: int | str | Media,
*,
sort: Iterable[StaffSort] | StaffSort | None = None,
) -> Iterator[Staff]:
"""
Expand Down Expand Up @@ -457,6 +459,7 @@ def get_staffs(
def get_airing_schedule(
self,
media: int | str | Media,
*,
not_yet_aired: bool | None = None,
) -> Iterator[AiringSchedule]:
"""
Expand Down Expand Up @@ -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]:
Expand Down

0 comments on commit a11cd95

Please sign in to comment.