cleaning up changes with help of linter

This commit is contained in:
AlexVonB
2020-08-09 21:17:39 +02:00
parent 3b049cdb9c
commit aceced68eb
2 changed files with 9 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ def escape(text):
return ''
return text.replace('_', r'\_')
def chomp(text):
"""
If the text in an inline tag like b, a, or em contains a leading or trailing
@@ -34,6 +35,7 @@ def chomp(text):
text = text.strip()
return (prefix, suffix, text)
def _todict(obj):
return dict((k, getattr(obj, k)) for k in dir(obj) if not k.startswith('_'))