Skip to content

Commit

Permalink
Update import order for unidecode vs text_unidecode (#126)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
enkidulan authored Jan 27, 2023
1 parent 93d15b7 commit 22d7e84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slugify/slugify.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
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']

Expand Down

0 comments on commit 22d7e84

Please sign in to comment.