Patchwork D7270: linelog: suppress annoying pytype warning about an ignored metaclass

login
register
mail settings
Submitter phabricator
Date Nov. 6, 2019, 10:57 p.m.
Message ID <differential-rev-PHID-DREV-mghvymvwxluizoe6kax3-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42820/
State Superseded
Headers show

Comments

phabricator - Nov. 6, 2019, 10:57 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This isn't actively hurting us right now, and it's not trivial to set
  up this metaclass correctly on both Python 2 and Python 3 without
  dragging in all of `six`, but we still get lots of typechecking
  goodness with this error suppressed.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/linelog.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/linelog.py b/mercurial/linelog.py
--- a/mercurial/linelog.py
+++ b/mercurial/linelog.py
@@ -53,7 +53,7 @@ 
         return iter(self.lines)
 
 
-class _llinstruction(object):
+class _llinstruction(object):  # pytype: disable=ignored-metaclass
 
     __metaclass__ = abc.ABCMeta