diff --git a/README.md b/README.md index 2014026..c760ff9 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ UUID('c4e21057-6b8a-4dc0-8000-000000000000') Notice that this is a truncated [UUID](https://docs.python.org/3/library/uuid.html), with everything beyond the first eight bytes zeroed out. -Once you have am ID, you can run `slugify_uuid` on it to get your slug. +Once you have an ID, you can run `slugify_uuid` on it to get your slug. ``` >>> from short_stuff import gen_unique_id, slugify diff --git a/short_stuff/lib.py b/short_stuff/lib.py index ee98961..519e2fc 100644 --- a/short_stuff/lib.py +++ b/short_stuff/lib.py @@ -76,8 +76,8 @@ class ShortUIDConverter: """ regex = r'[-a-zA-Z0-9_]{1,22}' - def to_python(self, value): + def to_python(self, value: str) -> UUID: return unslugify(value) - def to_url(self, value): + def to_url(self, value: UUID) -> str: return slugify(value)