mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
Make sure staticmethod params are (mostly) inferred correctly, fixes #735
This commit is contained in:
@@ -292,6 +292,40 @@ for part in qsplit:
|
||||
#? str()
|
||||
part
|
||||
|
||||
# -----------------
|
||||
# staticmethod, classmethod params
|
||||
# -----------------
|
||||
|
||||
class F():
|
||||
def __init__(self):
|
||||
self.my_variable = 3
|
||||
|
||||
@staticmethod
|
||||
def my_func(param):
|
||||
#? []
|
||||
param.my_
|
||||
#? ['upper']
|
||||
param.uppe
|
||||
#? str()
|
||||
return param
|
||||
|
||||
@staticmethod
|
||||
def my_func_without_call(param):
|
||||
#? []
|
||||
param.my_
|
||||
#? []
|
||||
param.uppe
|
||||
#?
|
||||
return param
|
||||
|
||||
@classmethod
|
||||
def my_method(cls, param):
|
||||
#? []
|
||||
param.my_method
|
||||
|
||||
|
||||
F.my_func('')
|
||||
|
||||
# -----------------
|
||||
# Unknown metaclass
|
||||
# -----------------
|
||||
|
||||
Reference in New Issue
Block a user