D7272: pytype: don't warn us about ignored-on-py3 metaclasses
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Wed Nov 6 23:01:05 UTC 2019
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
We can remove this when we're Python 3-only, but for now it's just too
awkward to deal with and it's harmless.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D7272
AFFECTED FILES
contrib/testparseutil.py
hgext/infinitepush/store.py
mercurial/fancyopts.py
mercurial/templater.py
mercurial/templateutil.py
mercurial/util.py
CHANGE DETAILS
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1304,7 +1304,7 @@
"""
-class transactional(object):
+class transactional(object): # pytype: disable=ignored-metaclass
"""Base class for making a transactional type into a context manager."""
__metaclass__ = abc.ABCMeta
diff --git a/mercurial/templateutil.py b/mercurial/templateutil.py
--- a/mercurial/templateutil.py
+++ b/mercurial/templateutil.py
@@ -31,7 +31,7 @@
pass
-class wrapped(object):
+class wrapped(object): # pytype: disable=ignored-metaclass
"""Object requiring extra conversion prior to displaying or processing
as value
@@ -108,7 +108,7 @@
"""
-class mappable(object):
+class mappable(object): # pytype: disable=ignored-metaclass
"""Object which can be converted to a single template mapping"""
__metaclass__ = abc.ABCMeta
diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -611,7 +611,7 @@
return s[1:-1]
-class resourcemapper(object):
+class resourcemapper(object): # pytype: disable=ignored-metaclass
"""Mapper of internal template resources"""
__metaclass__ = abc.ABCMeta
diff --git a/mercurial/fancyopts.py b/mercurial/fancyopts.py
--- a/mercurial/fancyopts.py
+++ b/mercurial/fancyopts.py
@@ -205,7 +205,7 @@
return parsedopts, parsedargs
-class customopt(object):
+class customopt(object): # pytype: disable=ignored-metaclass
"""Manage defaults and mutations for any type of opt."""
__metaclass__ = abc.ABCMeta
diff --git a/hgext/infinitepush/store.py b/hgext/infinitepush/store.py
--- a/hgext/infinitepush/store.py
+++ b/hgext/infinitepush/store.py
@@ -29,7 +29,7 @@
pass
-class abstractbundlestore(object):
+class abstractbundlestore(object): # pytype: disable=ignored-metaclass
"""Defines the interface for bundle stores.
A bundle store is an entity that stores raw bundle data. It is a simple
diff --git a/contrib/testparseutil.py b/contrib/testparseutil.py
--- a/contrib/testparseutil.py
+++ b/contrib/testparseutil.py
@@ -80,7 +80,7 @@
####################
-class embeddedmatcher(object):
+class embeddedmatcher(object): # pytype: disable=ignored-metaclass
"""Base class to detect embedded code fragments in *.t test script
"""
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list