Skip to content

Commit

Permalink
Fix a spelling error and add some missing type annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelketek committed Jul 11, 2019
1 parent fbd439b commit fb81a2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions short_stuff/lib.py
Expand Up @@ -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)

0 comments on commit fb81a2c

Please sign in to comment.