D7286: match: suppress error about subscripting an exception

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Wed Nov 6 23:00:50 UTC 2019


durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I get the sense I should file a bug about subscripting Exception subclasses.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/match.py

CHANGE DETAILS

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -345,7 +345,9 @@
                 ):
                     kindpats.append((k, p, source or pat))
             except error.Abort as inst:
-                raise error.Abort(b'%s: %s' % (pat, inst[0]))
+                raise error.Abort(
+                    b'%s: %s' % (pat, inst[0])
+                )  # pytype: disable=unsupported-operands
             except IOError as inst:
                 if warn:
                     warn(



To: durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list