Title: open() returns IO[str] instead of io.TextIOWrapper · Issue #1229 · python/typeshed · GitHub
Open Graph Title: open() returns IO[str] instead of io.TextIOWrapper · Issue #1229 · python/typeshed
X Title: open() returns IO[str] instead of io.TextIOWrapper · Issue #1229 · python/typeshed
Description: Hello, My env is Win7P+SP1 x64, Py 3.5.2 32b, Mypy 0.501. I opened this issue (#3286) in mypy, but GVR told me to open it here because it was a "(complex) typeshed issue". The var used in the with context is of type Open Graph Description: Hello, My env is Win7P+SP1 x64, Py 3.5.2 32b, Mypy 0.501. I opened this issue (#3286) in mypy, but GVR told me to open it here because it was a "(complex) typeshed issue". The var used in the with ...
X Description: Hello, My env is Win7P+SP1 x64, Py 3.5.2 32b, Mypy 0.501. I opened this issue (#3286) in mypy, but GVR told me to open it here because it was a "(complex) typeshed issue". The var used in...
Opengraph URL: https://github.com/python/typeshed/issues/1229
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"open() returns IO[str] instead of io.TextIOWrapper","articleBody":"Hello,\r\n\r\nMy env is Win7P+SP1 x64, Py 3.5.2 32b, Mypy 0.501.\r\n\r\nI opened this issue (#3286) in mypy, but GVR told me to open it here because it was a \"(complex) typeshed issue\".\r\n\r\nThe var used in the with context is of type \u003cclass '_io.TextIOWrapper'>.\r\n\r\n with open(pathname, encoding='utf-8') as f_in:\r\n print(type(f_in))\r\n\r\n \u003cclass '_io.TextIOWrapper'>\r\n\r\nBut when I try to set it's type, mypy returns the following error\r\n\r\n from io import TextIOWrapper\r\n with open(pathname, encoding='utf-8') as f_in: # type: TextIOWrapper\r\n print(type(f_in))\r\n\r\ndata_processing.py:917: error: Incompatible types in assignment (expression has type IO[Any], variable has type \"TextIOWrapper\")\r\n\r\nIf I try to use module typing's own TextIO type it returns\r\n\r\n from typing import TextIO\r\n with open(pathname, encoding='utf-8') as f_in: # type: TextIO\r\n print(type(f_in))\r\n\r\ndata_processing.py:917: error: Incompatible types in assignment (expression has type IO[Any], variable has type \"TextIO\")\r\n\r\nIt only works if I do\r\n\r\n from typing import IO\r\n with open(pathname, encoding='utf-8') as f_in: # type: IO[Any]\r\n print(type(f_in))\r\n\r\nBest regards,\r\n\r\nJM","author":{"url":"https://github.com/jcrmatos","@type":"Person","name":"jcrmatos"},"datePublished":"2017-05-01T03:35:55Z","url":"https://github.com/python/typeshed/issues/1229"}
react-profiling 0 react-import-map react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 route-pattern /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) route-controller voltron_issues_fragments route-action issue_layout fetch-nonce v2:08749429-5df6-3172-6de3-aea4ba9ad671 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id 9508:18E7F5:10E4122:1624964:6B0008A1 html-safe-nonce 565fa9075421307dbe8a02fb9109c239abe2950571c3ba49c7d29012154b545b visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTA4OjE4RTdGNToxMEU0MTIyOjE2MjQ5NjQ6NkIwMDA4QTEiLCJ2aXNpdG9yX2lkIjoiNjk4NzEwOTcwMjk0OTY2OTAyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 visitor-hmac b60c854b2577c6287d80b822cfe79cf5bc81e1cdb2286dd191e13932cf817579 hovercard-subject-tag issue:225379666 github-keyboard-shortcuts repository,issues,copilot google-site-verification Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I octolytics-url https://collector.github.com/github/collect analytics-location / fb:app_id 1401488693436528 apple-itunes-app app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/typeshed/1229/issue_layout twitter:image https://opengraph.githubassets.com/612d5821dea74247ec74cc3d5b45af09a1c73a4b31c6dd28b2e059c37358354d/python/typeshed/issues/1229 twitter:card summary_large_image og:image https://opengraph.githubassets.com/612d5821dea74247ec74cc3d5b45af09a1c73a4b31c6dd28b2e059c37358354d/python/typeshed/issues/1229 og:image:alt Hello, My env is Win7P+SP1 x64, Py 3.5.2 32b, Mypy 0.501. I opened this issue (#3286) in mypy, but GVR told me to open it here because it was a "(complex) typeshed issue". The var used in the with ... og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username jcrmatos hostname github.com expected-hostname github.com None 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 turbo-cache-control no-preview go-import github.com/python/typeshed git https://github.com/python/typeshed.git octolytics-dimension-user_id 1525981 octolytics-dimension-user_login python octolytics-dimension-repository_id 31696383 octolytics-dimension-repository_nwo python/typeshed octolytics-dimension-repository_public true octolytics-dimension-repository_is_fork false octolytics-dimension-repository_network_root_id 31696383 octolytics-dimension-repository_network_root_nwo python/typeshed turbo-body-classes logged-out env-production page-responsive disable-turbo false browser-stats-url https://api.github.com/_private/browser/stats browser-errors-url https://api.github.com/_private/browser/errors release 16a11879678aaf97e2a42c33ee70830aa084fa37 ui-target full theme-color #1e2327 color-scheme light dark react-app-name issues
URLs of crawlers that visited me.