mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-30 20:25:23 +08:00
Merge branch 'repr' of https://github.com/blueyed/jedi
Fixed a small merge conflict by hand.
This commit is contained in:
@@ -374,7 +374,11 @@ class BaseDefinition(object):
|
||||
return Definition(self._evaluator, context.name)
|
||||
|
||||
def __repr__(self):
|
||||
return "<%s %s>" % (type(self).__name__, self.description)
|
||||
return "<%s full_name=%r, description=%r>" % (
|
||||
self.__class__.__name__,
|
||||
self.full_name,
|
||||
self.description,
|
||||
)
|
||||
|
||||
def get_line_code(self, before=0, after=0):
|
||||
"""
|
||||
|
||||
@@ -32,8 +32,9 @@ class AbstractNameDefinition(object):
|
||||
|
||||
def __repr__(self):
|
||||
if self.start_pos is None:
|
||||
return '<%s: %s>' % (self.__class__.__name__, self.string_name)
|
||||
return '<%s: %s@%s>' % (self.__class__.__name__, self.string_name, self.start_pos)
|
||||
return '<%s: string_name=%s>' % (self.__class__.__name__, self.string_name)
|
||||
return '<%s: string_name=%s start_pos=%s>' % (self.__class__.__name__,
|
||||
self.string_name, self.start_pos)
|
||||
|
||||
def is_import(self):
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user