Make sure staticmethod params are (mostly) inferred correctly, fixes #735

This commit is contained in:
Dave Halter
2019-12-24 21:28:30 +01:00
parent 7a988d9d8b
commit 110d89724e
3 changed files with 45 additions and 1 deletions

View File

@@ -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
# -----------------