Title: `cfgparser.optionxform = str` gives erroneous error · Issue #5062 · python/mypy · GitHub
Open Graph Title: `cfgparser.optionxform = str` gives erroneous error · Issue #5062 · python/mypy
X Title: `cfgparser.optionxform = str` gives erroneous error · Issue #5062 · python/mypy
Description: The example at https://docs.python.org/3.6/library/configparser.html#configparser.ConfigParser.optionxform on how to make ConfigParser option names gives a mypy error. I originally created a typeshed issue at python/typeshed#1857 and @Je...
Open Graph Description: The example at https://docs.python.org/3.6/library/configparser.html#configparser.ConfigParser.optionxform on how to make ConfigParser option names gives a mypy error. I originally created a typesh...
X Description: The example at https://docs.python.org/3.6/library/configparser.html#configparser.ConfigParser.optionxform on how to make ConfigParser option names gives a mypy error. I originally created a typesh...
Opengraph URL: https://github.com/python/mypy/issues/5062
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`cfgparser.optionxform = str` gives erroneous error","articleBody":"The example at https://docs.python.org/3.6/library/configparser.html#configparser.ConfigParser.optionxform on how to make `ConfigParser` option names gives a `mypy` error.\r\n\r\nI originally created a typeshed issue at https://github.com/python/typeshed/issues/1857 and @JelleZijlstra suggested that this is instead a `mypy` bug.\r\n\r\n* Are you reporting a bug, or opening a feature request?\r\n\r\nA bug.\r\n* Please insert below the code you are checking with mypy,\r\n or a mock-up repro if the source is private. We would appreciate\r\n if you try to simplify your case to a minimal repro.\r\n\r\n```python\r\nfrom configparser import ConfigParser\r\n\r\ncfgparser = ConfigParser()\r\ncfgparser.optionxform = str\r\n```\r\n\r\n* What is the actual behavior/output?\r\n\r\n```\r\nexample.py:4: error: Cannot assign to a method\r\nexample.py:4: error: Incompatible types in assignment (expression has type \"Type[str]\", variable has type \"Callable[[str], str]\")\r\n```\r\n\r\n* What is the behavior/output you expect?\r\n\r\nI expect no error in this case.\r\n\r\n* What are the versions of mypy and Python you are using?\r\n\r\nmypy 0.600\r\nPython 3.6.5\r\n\r\n* What are the mypy flags you are using? (For example --strict-optional)\r\n\r\nJust ` --show-traceback`.","author":{"url":"https://github.com/adamtheturtle","@type":"Person","name":"adamtheturtle"},"datePublished":"2018-05-16T14:40:52Z","url":"https://github.com/python/mypy/issues/5062"}
| 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:552ac7f5-de93-066b-ed60-a4deaf45af95 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A0F8:4D728:2633E88:31BC3EB:6AFFF83A |
| html-safe-nonce | 56a3cbe603ccaa8fb9260178cf25f9c794e474c85aa71e60cdace95916511da8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMEY4OjRENzI4OjI2MzNFODg6MzFCQzNFQjo2QUZGRjgzQSIsInZpc2l0b3JfaWQiOiI2NTg2MjgxNTE5MjczMjExOTYzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 132543477e124d01c45e56ddd7930cb7749faf27d1c3ae7ea8918cda6078eff9 |
| hovercard-subject-tag | issue:323652082 |
| 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/mypy/5062/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5809e8ef7667a188c76b8226de66bde911d164568f902ad0aef3de3258d7a896/python/mypy/issues/5062 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5809e8ef7667a188c76b8226de66bde911d164568f902ad0aef3de3258d7a896/python/mypy/issues/5062 |
| og:image:alt | The example at https://docs.python.org/3.6/library/configparser.html#configparser.ConfigParser.optionxform on how to make ConfigParser option names gives a mypy error. I originally created a typesh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | adamtheturtle |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| 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 |
Links:
Viewport: width=device-width