8000 Sync typeshed by cdce8p · Pull Request #17586 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Sync typeshed #17586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix pythoneval tests
  • Loading branch information
cdce8p committed Jul 25, 2024
commit 358df5d77fb855cbcd8c098172b5ef72fe68aca5
14 changes: 7 additions & 7 deletions test-data/unit/pythoneval.test
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ f.write(b'x')
f.foobar()
[out]
_program.py:3: error: Argument 1 to "write" of "TextIOBase" has incompatible type "bytes"; expected "str"
_program.py:4: error: "TextIOWrapper" has no attribute "foobar"
_program.py:4: error: "TextIOWrapper[_WrappedBuffer]" has no attribute "foobar"

[case testOpenReturnTypeInference]
reveal_type(open('x'))
Expand All @@ -295,8 +295,8 @@ reveal_type(open('x', 'rb'))
mode = 'rb'
reveal_type(open('x', mode))
[out]
_program.py:1: note: Revealed type is "io.TextIOWrapper"
_program.py:2: note: Revealed type is "io.TextIOWrapper"
_program.py:1: note: Revealed type is "io.TextIOWrapper[io._WrappedBuffer]"
_program.py:2: note: Revealed type is "io.TextIOWrapper[io._WrappedBuffer]"
_program.py:3: note: Revealed type is "io.BufferedReader"
_program.py:5: note: Revealed type is "typing.IO[Any]"

Expand All @@ -319,8 +319,8 @@ reveal_type(p.open('rb'))
mode = 'rb'
reveal_type(p.open(mode))
[out]
_program.py:3: note: Revealed type is "io.TextIOWrapper"
_program.py:4: note: Revealed type is "io.TextIOWrapper"
_program.py:3: note: Revealed type is "io.TextIOWrapper[io._WrappedBuffer]"
_program.py:4: note: Revealed type is "io.TextIOWrapper[io._WrappedBuffer]"
_program.py:5: note: Revealed type is "io.BufferedReader"
_program.py:7: note: Revealed type is "typing.IO[Any]"

Expand All @@ -332,8 +332,8 @@ reveal_type(p.open(errors='replace', mode='r'))
mode = 'r'
reveal_type(p.open(mode=mode, errors='replace'))
[out]
_program.py:3: note: Revealed type is "io.TextIOWrapper"
_program.py:4: 5689 note: Revealed type is "io.TextIOWrapper"
_program.py:3: note: Revealed type is "io.TextIOWrapper[io._WrappedBuffer]"
_program.py:4: note: Revealed type is "io.TextIOWrapper[io._WrappedBuffer]"
_program.py:6: note: Revealed type is "typing.IO[Any]"

[case testGenericPatterns]
Expand Down
Loading
0