Mercurial > public > mercurial-scm > hg
comparison mercurial/thirdparty/zope/interface/common/interfaces.py @ 37178:68ee61822182
thirdparty: port zope.interface to relative imports
By using relative imports, we're guaranteed to get modules
vendored with Mercurial rather than other random modules
that might be in sys.path.
My editor strips trailing whitespace on save. So some minor
source code cleanup was also performed as part of this commit.
# no-check-commit because some modified lines have double newlines
Differential Revision: https://phab.mercurial-scm.org/D2930
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 21 Mar 2018 19:52:30 -0700 |
parents | 943d77fc07a3 |
children |
comparison
equal
deleted
inserted
replaced
37177:338367d44d34 | 37178:68ee61822182 |
---|---|
11 # FOR A PARTICULAR PURPOSE. | 11 # FOR A PARTICULAR PURPOSE. |
12 # | 12 # |
13 ############################################################################## | 13 ############################################################################## |
14 """Interfaces for standard python exceptions | 14 """Interfaces for standard python exceptions |
15 """ | 15 """ |
16 from zope.interface import Interface | 16 |
17 from zope.interface import classImplements | 17 from __future__ import absolute_import |
18 | |
19 from .. import Interface | |
20 from .. import classImplements | |
18 | 21 |
19 class IException(Interface): pass | 22 class IException(Interface): pass |
20 class IStandardError(IException): pass | 23 class IStandardError(IException): pass |
21 class IWarning(IException): pass | 24 class IWarning(IException): pass |
22 class ISyntaxError(IStandardError): pass | 25 class ISyntaxError(IStandardError): pass |