Mercurial > hg
comparison mercurial/formatter.py @ 48888:07a7b57d3e33
formatter: remove conditional assert
We always run on Python 3 now.
Differential Revision: https://phab.mercurial-scm.org/D12291
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 10:26:25 -0700 |
parents | 6000f5b25c9b |
children | f254fc73d956 |
comparison
equal
deleted
inserted
replaced
48887:426cf9d98a5d | 48888:07a7b57d3e33 |
---|---|
556 def reference_templatespec(ref, refargs=None): | 556 def reference_templatespec(ref, refargs=None): |
557 return templatespec(ref, None, None, refargs) | 557 return templatespec(ref, None, None, refargs) |
558 | 558 |
559 | 559 |
560 def literal_templatespec(tmpl): | 560 def literal_templatespec(tmpl): |
561 if pycompat.ispy3: | 561 assert not isinstance(tmpl, str), b'tmpl must not be a str' |
562 assert not isinstance(tmpl, str), b'tmpl must not be a str' | |
563 return templatespec(b'', tmpl, None) | 562 return templatespec(b'', tmpl, None) |
564 | 563 |
565 | 564 |
566 def mapfile_templatespec(topic, mapfile, fp=None): | 565 def mapfile_templatespec(topic, mapfile, fp=None): |
567 return templatespec(topic, None, mapfile, fp=fp) | 566 return templatespec(topic, None, mapfile, fp=fp) |