[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] Add type hints to slugify function.
From: |
jgart |
Subject: |
[PATCH 2/2] Add type hints to slugify function. |
Date: |
Mon, 4 Oct 2021 23:33:06 -0400 |
---
mediagoblin/tools/url.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mediagoblin/tools/url.py b/mediagoblin/tools/url.py
index 6a33b5c0..c8483cce 100644
--- a/mediagoblin/tools/url.py
+++ b/mediagoblin/tools/url.py
@@ -20,7 +20,7 @@ from unidecode import unidecode
_punct_re = re.compile(r'[\t !"#:$%&\'()*\-/<=>?@\[\\\]^_`{|},.]+')
-def slugify(text, delim="-"):
+def slugify(text: str, delim: str = "-") -> str:
"""
Generates an ASCII-only slug. Taken from http://flask.pocoo.org/snippets/5/
"""
--
2.33.0