mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-01 17:53:21 +08:00
Use super().__getattribute__ instead of custom AttributeErrors in __getattr__.
This commit is contained in:
@@ -11,11 +11,7 @@ from jedi.common import to_list
|
||||
|
||||
class AbstractNameDefinition(object):
|
||||
start_pos = None
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def string_name(self):
|
||||
raise NotImplementedError
|
||||
string_name = None
|
||||
|
||||
@abstractmethod
|
||||
def infer(self):
|
||||
@@ -44,7 +40,7 @@ class TreeNameDefinition(AbstractNameDefinition):
|
||||
return _name_to_types(self.parent_context._evaluator, self.parent_context, self._name, None)
|
||||
|
||||
def __repr__(self):
|
||||
return '%s: %s@%s' % (type(self).__name__, self.string_name, self.start_pos)
|
||||
return '<%s: %s@%s>' % (type(self).__name__, self.string_name, self.start_pos)
|
||||
|
||||
|
||||
class AbstractFilter(object):
|
||||
@@ -122,6 +118,7 @@ class FunctionExecutionFilter(ParserTreeFilter):
|
||||
until_position=None, origin_scope=None):
|
||||
super(FunctionExecutionFilter, self).__init__(
|
||||
evaluator,
|
||||
context,
|
||||
parser_scope,
|
||||
until_position,
|
||||
origin_scope
|
||||
|
||||
Reference in New Issue
Block a user