Type hinting google docstring Attributes
已回答
Docstring Google/NumPy format allow define class attributes with keyword "Attributes". But pycharm type hinting ignore it.
Class attributes defined under keyword Parameters works fine, but its not correct.
class Foo(object):
"""Foo object
Parameters
----------
param1 : int
Description of arg1
param2 : str
Description of arg2
Attributes
----------
msg : dict
Description of msg
code : list
Description of code
"""
def __init__(self, param1, param2):
self.msg = None
self.code = None
class Bar(object):
"""Bar object
Parameters
----------
param1 : int
Description of arg1
param2 : str
Description of arg2
msg : dict
Description of msg
code : list
Description of code
"""
def __init__(self, param1, param2):
self.msg = None
self.code = None
请先登录再写评论。
Hi Lipovsky 92! I believe this problem is covered by PY-16760 and PY-22464.