mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
refs #2432 update for latest master
This commit is contained in:
parent
d1c6d3c45b
commit
021974ed94
@ -1025,7 +1025,7 @@ def test_type_hints():
|
|||||||
from sphinx.util.inspect import getargspec
|
from sphinx.util.inspect import getargspec
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from typing_test_data import f0, f1, f2, f3, f4, f5, f6, f7, f8, f9
|
from typing_test_data import f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10
|
||||||
except (ImportError, SyntaxError):
|
except (ImportError, SyntaxError):
|
||||||
raise SkipTest('Cannot import Python code with function annotations')
|
raise SkipTest('Cannot import Python code with function annotations')
|
||||||
|
|
||||||
@ -1066,4 +1066,4 @@ def test_type_hints():
|
|||||||
' y: typing.Tuple[int, ...]) -> None')
|
' y: typing.Tuple[int, ...]) -> None')
|
||||||
|
|
||||||
# Instance annotations
|
# Instance annotations
|
||||||
verify_arg_spec(f9, '(x: CustomAnnotation, y: 123) -> None')
|
verify_arg_spec(f10, '(x: CustomAnnotation, y: 123) -> None')
|
||||||
|
@ -56,5 +56,5 @@ class CustomAnnotation:
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return 'CustomAnnotation'
|
return 'CustomAnnotation'
|
||||||
|
|
||||||
def f9(x: CustomAnnotation(), y: 123) -> None:
|
def f10(x: CustomAnnotation(), y: 123) -> None:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user