Change some more tests for typeshed

This commit is contained in:
Dave Halter
2026-05-01 17:07:36 +02:00
parent d87a4af50f
commit 8ba5b67622
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ next(reversed(yielder()))
#?
next(reversed())
#? str() bytes()
#? str()
next(open(''))
#? int()
@@ -91,7 +91,7 @@ os._T
with open('foo') as f:
for line in f.readlines():
#? str() bytes()
#? bytes()
line
# -----------------
# enumerate
+2 -2
View File
@@ -614,8 +614,8 @@ def test_definition_goto_follow_imports(Script):
('n = {1: ""}; n', 'Dict[int, str]'),
('n = {1: "", 1.0: b""}; n', 'Dict[Union[float, int], Union[bytes, str]]'),
('n = next; n', 'Union[next(__i: Iterator[_T]) -> _T, '
'next(__i: Iterator[_T], default: _VT) -> Union[_T, _VT]]'),
('n = next; n', 'Union[next(i: SupportsNext[_T], /) -> _T, '
'next(i: SupportsNext[_T], default: _VT, /) -> _T | _VT]'),
('abs', 'abs(x: SupportsAbs[_T], /) -> _T'),
('def foo(x, y): return x if xxxx else y\nfoo(str(), 1)\nfoo',
'foo(x: str, y: int) -> Union[int, str]'),