Show More
@@ -647,7 +647,7 b' class Magics(object):' | |||
|
647 | 647 | self.options_table[fn] = optstr |
|
648 | 648 | |
|
649 | 649 | class MagicAlias(object): |
|
650 | """Store a magic alias. | |
|
650 | """An alias to another magic function. | |
|
651 | 651 | |
|
652 | 652 | An alias is determined by its magic name and magic kind. Lookup |
|
653 | 653 | is done at call time, so if the underlying magic changes the alias |
@@ -661,16 +661,10 b' class MagicAlias(object):' | |||
|
661 | 661 | self.magic_name = magic_name |
|
662 | 662 | self.magic_kind = magic_kind |
|
663 | 663 | |
|
664 | self._in_call = False | |
|
665 | ||
|
666 | @property | |
|
667 | def pretty_target(self): | |
|
668 | """A formatted version of the target of the alias.""" | |
|
669 | return '%s%s' % (magic_escapes[self.magic_kind], self.magic_name) | |
|
664 | self.pretty_target = '%s%s' % (magic_escapes[self.magic_kind], self.magic_name) | |
|
665 | self.__doc__ = "Alias for `%s`." % self.pretty_target | |
|
670 | 666 | |
|
671 | @property | |
|
672 | def __doc__(self): | |
|
673 | return "Alias for `%s`." % self.pretty_target | |
|
667 | self._in_call = False | |
|
674 | 668 | |
|
675 | 669 | def __call__(self, *args, **kwargs): |
|
676 | 670 | """Call the magic alias.""" |
General Comments 0
You need to be logged in to leave comments.
Login now