0
다음 함수에서 docstring을 정의하는 방법은 무엇입니까?PyCharm + python2.7에서 일반 반환 유형을 지정하는 방법
from sample.utils import get_object
from sample.models import User
u = get_object(User, name='test')
u. # no PyCharm hint here
또한 또한 :(
작동하지:type klass: T
및
:rtype: T
을 시도 : 나는
klass
을 시도했습니다
def get_object(klass, **kwargs):
"""
:rtype: ???
"""
# perform some tasks
return klass(**kwargs)
, type(klass)
, klass.__class__
, 모두 분리 모듈 파일에서 작동하지 않았다
PyCharm에서 이러한 종류의 구문을 문서화 문자열에서 지원할 수 있습니까? 문서화 방법
이 같은