summaryrefslogtreecommitdiff
path: root/slugify/slugify.py
diff options
context:
space:
mode:
authorVal Neekman <un33kvu@gmail.com>2019-10-20 13:39:51 -0400
committerGitHub <noreply@github.com>2019-10-20 13:39:51 -0400
commit76f327216bc52adc6115eb6d1483405958810c5c (patch)
treee5eb48e5627724062166eeb6e2898f6c0acfd0be /slugify/slugify.py
parentb9db1bc87e3b19c5c63ab7a00b19685b7996de5d (diff)
downloadpython-slugify-4.0.0.tar.gz
Drop support for old python - cleanup - up version (#88)4.0.0
* Drop support for EOL Python 2.6 and 3.2-2.4 (#87) * Drop support for EOL Python 2.6 and 3.2-3.4 * Remove duplicate class * Upgrade Python syntax with pyupgrade * Upgrade PyPy and PyPy3 and test 3.8 beta * up version
Diffstat (limited to 'slugify/slugify.py')
-rw-r--r--slugify/slugify.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/slugify/slugify.py b/slugify/slugify.py
index 6e66ace..4268fd1 100644
--- a/slugify/slugify.py
+++ b/slugify/slugify.py
@@ -62,9 +62,9 @@ def smart_truncate(string, max_length=0, word_boundary=False, separator=' ', sav
if word:
next_len = len(truncated) + len(word)
if next_len < max_length:
- truncated += '{0}{1}'.format(word, separator)
+ truncated += '{}{}'.format(word, separator)
elif next_len == max_length:
- truncated += '{0}'.format(word)
+ truncated += '{}'.format(word)
break
else:
if save_order: