/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to tools/brz_epydoc_uid.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
"""Monkey patch to make epydoc work with bzrlib's lazy imports."""
 
17
"""Monkey patch to make epydoc work with breezy's lazy imports."""
18
18
 
19
19
import epydoc.uid
20
20
 
21
 
import bzrlib.lazy_import
 
21
import breezy.lazy_import
22
22
 
23
23
 
24
24
_ObjectUID = epydoc.uid.ObjectUID
25
 
_ScopeReplacer = bzrlib.lazy_import.ScopeReplacer
 
25
_ScopeReplacer = breezy.lazy_import.ScopeReplacer
26
26
 
27
27
 
28
28
class ObjectUID(_ObjectUID):
30
30
    def __init__(self, obj):
31
31
        if isinstance(obj, _ScopeReplacer):
32
32
            # The isinstance will trigger a replacement if it is a real
33
 
            # _BzrScopeReplacer, but the local object won't know about it, so
 
33
            # _BrzScopeReplacer, but the local object won't know about it, so
34
34
            # replace it locally.
35
35
            obj = object.__getattribute__(obj, '_real_obj')
36
36
        _ObjectUID.__init__(self, obj)