summaryrefslogtreecommitdiff
path: root/slugify
diff options
context:
space:
mode:
Diffstat (limited to 'slugify')
-rw-r--r--slugify/__init__.py2
-rw-r--r--slugify/slugify.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/slugify/__init__.py b/slugify/__init__.py
index 8b20b5f..daaafd8 100644
--- a/slugify/__init__.py
+++ b/slugify/__init__.py
@@ -3,4 +3,4 @@ from .slugify import *
__author__ = 'Val Neekman @ Neekware Inc. [@vneekman]'
__description__ = 'A Python slugify application that also handles Unicode'
-__version__ = '1.2.0'
+__version__ = '1.2.1'
diff --git a/slugify/slugify.py b/slugify/slugify.py
index 113afdd..327f2c1 100644
--- a/slugify/slugify.py
+++ b/slugify/slugify.py
@@ -16,7 +16,7 @@ except ImportError:
import unidecode
-__all__ = ['slugify']
+__all__ = ['slugify', 'smart_truncate']
CHAR_ENTITY_PATTERN = re.compile('&(%s);' % '|'.join(name2codepoint))
@@ -65,7 +65,7 @@ def smart_truncate(string, max_length=0, word_boundaries=False, separator=' ', s
else:
if save_order:
break
- if not truncated:
+ if not truncated: # pragma: no cover
truncated = string[:max_length]
return truncated.strip(separator)
@@ -152,7 +152,7 @@ def slugify(text, entities=True, decimal=True, hexadecimal=True, max_length=0, w
return text
-def main():
+def main(): # pragma: no cover
if len(sys.argv) < 2:
print("Usage %s TEXT TO SLUGIFY" % sys.argv[0])
else: