Mercurial > public > mercurial-scm > hg
diff mercurial/interfaces/util.py @ 43076:2372284d9457
formatting: blacken the codebase
This is using my patch to black
(https://github.com/psf/black/pull/826) so we don't un-wrap collection
literals.
Done with:
hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S
# skip-blame mass-reformatting only
# no-check-commit reformats foo_bar functions
Differential Revision: https://phab.mercurial-scm.org/D6971
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 06 Oct 2019 09:45:02 -0400 |
parents | 2c4f656c8e9f |
children | 687b865b95ad |
line wrap: on
line diff
--- a/mercurial/interfaces/util.py Sat Oct 05 10:29:34 2019 -0400 +++ b/mercurial/interfaces/util.py Sun Oct 06 09:45:02 2019 -0400 @@ -11,26 +11,24 @@ from __future__ import absolute_import -from .. import ( - encoding, -) +from .. import encoding if encoding.environ.get('HGREALINTERFACES'): - from ..thirdparty.zope import ( - interface as zi, - ) + from ..thirdparty.zope import interface as zi Attribute = zi.Attribute Interface = zi.Interface implementer = zi.implementer else: + class Attribute(object): def __init__(self, __name__, __doc__=''): pass class Interface(object): - def __init__(self, name, bases=(), attrs=None, __doc__=None, - __module__=None): + def __init__( + self, name, bases=(), attrs=None, __doc__=None, __module__=None + ): pass def implementer(*ifaces):