Patchwork D12291: formatter: remove conditional assert

login
register
mail settings
Submitter phabricator
Date March 2, 2022, 11:30 p.m.
Message ID <differential-rev-PHID-DREV-63f4pzke4jbh5v63i36h-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50632/
State New
Headers show

Comments

phabricator - March 2, 2022, 11:30 p.m.
indygreg created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  We always run on Python 3 now.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D12291

AFFECTED FILES
  mercurial/formatter.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/formatter.py b/mercurial/formatter.py
--- a/mercurial/formatter.py
+++ b/mercurial/formatter.py
@@ -558,8 +558,7 @@ 
 
 
 def literal_templatespec(tmpl):
-    if pycompat.ispy3:
-        assert not isinstance(tmpl, str), b'tmpl must not be a str'
+    assert not isinstance(tmpl, str), b'tmpl must not be a str'
     return templatespec(b'', tmpl, None)