diff options
| author | Colin Wilk <colin.wilk@tum.de> | 2023-10-02 01:10:42 +0200 |
|---|---|---|
| committer | Colin Wilk <colin.wilk@tum.de> | 2023-10-02 01:10:42 +0200 |
| commit | da105eb3dd66935401c7740a132b3d18d77294ec (patch) | |
| tree | 9188c81f6a2381038fd4404989efc963b59c358a /src/lib/szurubooru.py | |
| parent | 45301553e15e95afe3139f8efa4885c1462d436d (diff) | |
| download | szuruboorupy-da105eb3dd66935401c7740a132b3d18d77294ec.tar.gz szuruboorupy-da105eb3dd66935401c7740a132b3d18d77294ec.zip | |
Add pydantic to dataclasses
Verifies the type annotations on the classes.
This commit also fixes a bug where an invalid type was returned for
suggestions of a Tag. The return type was a dict of a Micro Tag
Structure but it was expected to be a string (see szurubooru.py)
Signed-off-by: Colin Wilk <colin.wilk@tum.de>
Diffstat (limited to 'src/lib/szurubooru.py')
| -rw-r--r-- | src/lib/szurubooru.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/szurubooru.py b/src/lib/szurubooru.py index 1219cfb..38c6265 100644 --- a/src/lib/szurubooru.py +++ b/src/lib/szurubooru.py @@ -533,7 +533,7 @@ class Szurubooru: category=c["category"], description=c["description"], implications=list(map(lambda a: a["names"][0], c["implications"])), - suggestions=c["suggestions"], + suggestions=list(map(lambda a: a["names"][0], c["suggestions"])), ) def tag_exists(self, name: str) -> bool: |