diff options
author | Maksym Shalenyi <maksym.shalenyi@crunch.io> | 2023-01-27 14:47:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-27 17:47:04 -0500 |
commit | 22d7e84b95869dd4300952b88113dd00e53e9ec7 (patch) | |
tree | 0f1cb6c1e80ad6e31de3cef20f0632e7446be31e | |
parent | 93d15b7f07c748e86d831f9268e04e80f807224a (diff) | |
download | python-slugify-22d7e84b95869dd4300952b88113dd00e53e9ec7.tar.gz |
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`.
-rw-r--r-- | slugify/slugify.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/slugify/slugify.py b/slugify/slugify.py index b8c02ad..5354fa5 100644 --- a/slugify/slugify.py +++ b/slugify/slugify.py @@ -4,9 +4,9 @@ import unicodedata from html.entities import name2codepoint try: - import text_unidecode as unidecode -except ImportError: import unidecode +except ImportError: + import text_unidecode as unidecode __all__ = ['slugify', 'smart_truncate'] |