if both docstring and annotations are present, use both for function parameters

This commit is contained in:
Claude
2015-12-13 23:55:07 +01:00
parent f8debace0d
commit 7f8b878c8c
2 changed files with 16 additions and 8 deletions

View File

@@ -7,7 +7,13 @@ class A():
pass
def function_parameters(a: A, b, c: str, d: int=4):
def function_parameters(a: A, b, c: str, d: int, e: str, f: str, g: int=4):
"""
:param e: if docstring and annotation agree, only one should be returned
:type e: str
:param f: if docstring and annotation disagree, both should be returned
:type f: int
"""
#? A()
a
#?
@@ -16,6 +22,12 @@ def function_parameters(a: A, b, c: str, d: int=4):
c
#? int()
d
#? str()
e
#? int() str()
f
# int()
g
def return_unspecified():