Skip to content

Commit

Permalink
fix: tests (#2)
Browse files Browse the repository at this point in the history
* fix: minor cleanup

* explicitly specify type
  • Loading branch information
Ravencentric authored Mar 17, 2024
1 parent 66d32d9 commit 5534801
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
## About

- Supports both sync and async.
- Simple *read-only* API wrapper.
- Read-only API wrapper.
- Only supports querying the `Media` type.

## Installation
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
## About

- Supports both sync and async.
- Simple *read-only* API wrapper.
- Read-only API wrapper.
- Only supports querying the `Media` type.

## Installation
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description = "Simple read-only Anilist API wrapper"
authors = ["Raventric <78981416+Ravencentric@users.noreply.github.com>"]
license = "Unlicense"
readme = "README.md"
keywords = ["anilist", "anime", "python"]
packages = [{include = "pyanilist", from = "src"}]
homepage = "https://ravencentric.github.io/pyanilist"
repository = "https://github.com/Ravencentric/pyanilist"
Expand Down
11 changes: 0 additions & 11 deletions src/pyanilist/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
from . import _clients as clients
from . import _enums as enums
from . import _exceptions as exceptions
from . import _models as models
from . import _types as types
from ._clients import Anilist, AsyncAnilist
from ._enums import (
CharacterRole,
Expand Down Expand Up @@ -75,12 +70,6 @@
# Clients
"AsyncAnilist",
"Anilist",
# Modules
"clients",
"enums",
"exceptions",
"models",
"types",
# Enums
"CharacterRole",
"ExternalLinkType",
Expand Down
2 changes: 1 addition & 1 deletion src/pyanilist/_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
WriteError,
WriteTimeout,
)
from pydantic_core import ValidationError
from pydantic import ValidationError

__all__ = [
"CloseError",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_anilist.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


def test_anilist() -> None:
media = Anilist().search("Attack on titan")
media = Anilist().search("Attack on titan", type=MediaType.ANIME)
assert media.title.romaji == "Shingeki no Kyojin"
assert media.start_date.year == 2013
assert media.source == MediaSource.MANGA
Expand Down
2 changes: 1 addition & 1 deletion tests/test_async_anilist.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


async def test_anilist() -> None:
media = await AsyncAnilist().search("Attack on titan")
media = await AsyncAnilist().search("Attack on titan", type=MediaType.ANIME)
assert media.title.romaji == "Shingeki no Kyojin"
assert media.start_date.year == 2013
assert media.source == MediaSource.MANGA
Expand Down

0 comments on commit 5534801

Please sign in to comment.