summaryrefslogtreecommitdiff
path: root/slugify/slugify.py
diff options
context:
space:
mode:
authorVal Neekman <val@neekware.com>2016-08-26 11:58:56 -0400
committerVal Neekman <val@neekware.com>2016-08-26 11:58:56 -0400
commit6472f8fae4088f323a69ef5086f0f97268be88f8 (patch)
treeeb61dadaf4a7c91efcfe6463851efd7e46424bb9 /slugify/slugify.py
parent66146885159df3cf24e9ebe32aa288b9900ea052 (diff)
downloadpython-slugify-1.2.1.tar.gz
add py3.5 support, add manifest.in file, add more tests1.2.1
Diffstat (limited to 'slugify/slugify.py')
-rw-r--r--slugify/slugify.py6
1 files changed, 3 insertions, 3 deletions
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: