Skip to content

Commit 22d7e84

Browse files
authored
Update import order for unidecode vs text_unidecode (#126)
AS is `text_unidecode` is install_requires it is always present in the python environment, it makes sense to try import optinal dependency `unidecode` first, and only then fallback to `text_unidecode`.
1 parent 93d15b7 commit 22d7e84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

slugify/slugify.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
from html.entities import name2codepoint
55

66
try:
7-
import text_unidecode as unidecode
8-
except ImportError:
97
import unidecode
8+
except ImportError:
9+
import text_unidecode as unidecode
1010

1111
__all__ = ['slugify', 'smart_truncate']
1212

0 commit comments

Comments
 (0)