|
|
|
@ -229,26 +229,6 @@ class TestPositionalOnlyArgumentsModule(object):
|
|
|
|
|
with io.open(example_path, encoding="utf8") as example_handle:
|
|
|
|
|
example_file = example_handle.read()
|
|
|
|
|
|
|
|
|
|
# Sphinx 3 incorrectly adds default values
|
|
|
|
|
if sphinx.version_info >= (3,):
|
|
|
|
|
assert "f_simple(a, b, /, c, d, *, e=None, f=None)" in example_file
|
|
|
|
|
|
|
|
|
|
assert (
|
|
|
|
|
"f_comment(a: int, b: int, /, c: Optional[int], d: Optional[int], *, e: float = None, f: float = None)"
|
|
|
|
|
in example_file
|
|
|
|
|
)
|
|
|
|
|
assert (
|
|
|
|
|
"f_annotation(a: int, b: int, /, c: Optional[int], d: Optional[int], *, e: float = None, f: float = None)"
|
|
|
|
|
in example_file
|
|
|
|
|
)
|
|
|
|
|
# Requires unreleased astroid >2.4
|
|
|
|
|
# assert "f_arg_comment(a: int, b: int, /, c: Optional[int], d: Optional[int], *, e: float, f: float)" in example_file
|
|
|
|
|
assert (
|
|
|
|
|
"f_no_cd(a: int, b: int, /, *, e: float = None, f: float = None)"
|
|
|
|
|
in example_file
|
|
|
|
|
)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
assert "f_simple(a, b, /, c, d, *, e, f)" in example_file
|
|
|
|
|
|
|
|
|
|
assert (
|
|
|
|
@ -259,8 +239,7 @@ class TestPositionalOnlyArgumentsModule(object):
|
|
|
|
|
"f_annotation(a: int, b: int, /, c: Optional[int], d: Optional[int], *, e: float, f: float)"
|
|
|
|
|
in example_file
|
|
|
|
|
)
|
|
|
|
|
# Requires unreleased astroid >2.4
|
|
|
|
|
# assert "f_arg_comment(a: int, b: int, /, c: Optional[int], d: Optional[int], *, e: float, f: float)" in example_file
|
|
|
|
|
assert "f_arg_comment(a: int, b: int, /, c: Optional[int], d: Optional[int], *, e: float, f: float)" in example_file
|
|
|
|
|
assert "f_no_cd(a: int, b: int, /, *, e: float, f: float)" in example_file
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|