diff options
author | David Lord <davidism@gmail.com> | 2018-10-21 14:54:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-21 14:54:44 -0700 |
commit | ab27b34c46e5c71e5fad3dff06c1fce8fd97bd68 (patch) | |
tree | de9016481918625f1fb44f878015286b3281e310 | |
parent | 0e057153552a56c31b6f53dec6167c619ad7f9c1 (diff) | |
parent | a005a0799c80f8500c5478109d04cda3688e9061 (diff) | |
download | markupsafe-ab27b34c46e5c71e5fad3dff06c1fce8fd97bd68.tar.gz |
Merge pull request #100 from rsiemens/unreachable-code-fix
restore __html_format__ method
-rw-r--r-- | src/markupsafe/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/markupsafe/__init__.py b/src/markupsafe/__init__.py index 0bd6fd2..f67e5be 100644 --- a/src/markupsafe/__init__.py +++ b/src/markupsafe/__init__.py @@ -191,11 +191,11 @@ class Markup(text_type): kwargs = _MagicFormatMapping(args, kwargs) return self.__class__(formatter.vformat(self, args, kwargs)) - def __html_format__(self, format_spec): - if format_spec: - raise ValueError('Unsupported format specification ' - 'for Markup.') - return self + def __html_format__(self, format_spec): + if format_spec: + raise ValueError('Unsupported format specification ' + 'for Markup.') + return self # not in python 3 if hasattr(text_type, '__getslice__'): |