mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
Merge branch 'master' of github.com:davidhalter/jedi
This commit is contained in:
@@ -281,7 +281,11 @@ class CompiledName(AbstractNameDefinition):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def api_type(self):
|
def api_type(self):
|
||||||
return next(iter(self.infer())).api_type
|
api = self.infer()
|
||||||
|
# If we can't find the type, assume it is an instance variable
|
||||||
|
if not api:
|
||||||
|
return "instance"
|
||||||
|
return next(iter(api)).api_type
|
||||||
|
|
||||||
@underscore_memoization
|
@underscore_memoization
|
||||||
def infer(self):
|
def infer(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user