Title: error in argument when using chained function-call · Issue #5311 · python/mypy · GitHub
Open Graph Title: error in argument when using chained function-call · Issue #5311 · python/mypy
X Title: error in argument when using chained function-call · Issue #5311 · python/mypy
Description: Example: dct = {"": ""} # ok trans = str.maketrans(dct) "".translate(trans) # err "".translate(str.maketrans(dct)) What is the actual behavior/output? maketrans.py:8: error: Argument 1 to "maketrans" of "str" has incompatible type "Dict[...
Open Graph Description: Example: dct = {"": ""} # ok trans = str.maketrans(dct) "".translate(trans) # err "".translate(str.maketrans(dct)) What is the actual behavior/output? maketrans.py:8: error: Argument 1 to "maketran...
X Description: Example: dct = {"": ""} # ok trans = str.maketrans(dct) "".translate(trans) # err "".translate(str.maketrans(dct)) What is the actual behavior/output? maketr...
Opengraph URL: https://github.com/python/mypy/issues/5311
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"error in argument when using chained function-call","articleBody":"Example:\r\n\r\n```\r\ndct = {\"\": \"\"}\r\n\r\n# ok\r\ntrans = str.maketrans(dct)\r\n\"\".translate(trans)\r\n\r\n# err\r\n\"\".translate(str.maketrans(dct))\r\n```\r\n\r\n* What is the actual behavior/output?\r\n\r\n`maketrans.py:8: error: Argument 1 to \"maketrans\" of \"str\" has incompatible type \"Dict[str, str]\"; expected \"Union[Dict[int, Union[int, str, None]], Dict[str, Union[int, str, None]], Dict[Union[str, int], Union[int, str, None]]]\"`\r\n\r\n* What is the behavior/output you expect?\r\n\r\nNo error.\r\n\r\n* What are the versions of mypy and Python you are using?\r\n\r\nI tested both mypy 0.610 and mypy 0.620+dev-0ca6bf9ce63439a1e8bcc4dec80ef12f8414cb87 with Python 3.6.5; behavior is identical.","author":{"url":"https://github.com/z33ky","@type":"Person","name":"z33ky"},"datePublished":"2018-07-03T15:46:08Z","url":"https://github.com/python/mypy/issues/5311"}
| 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:08c6ca36-3e62-3150-6fcf-ece198cb4ac9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 87D4:B438C:C0E8C9:FBA48D:6AFFF1A8 |
| html-safe-nonce | acc0a6c35383a13d590c3de1bc368eca5795b5645ddc355e15288444dba7c5db |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4N0Q0OkI0MzhDOkMwRThDOTpGQkE0OEQ6NkFGRkYxQTgiLCJ2aXNpdG9yX2lkIjoiNzEwMjc0Nzc0NjAyNDU1MDgyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6b7a58fc0949dc4988d8645e92e09d28708c5192c8e74813dd74aecf0509f783 |
| hovercard-subject-tag | issue:337956527 |
| 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/5311/issue_layout |
| twitter:image | https://opengraph.githubassets.com/05ebd25b3a513339b9b8700792e19bcdbc2ef16eb9a930c80545c9195af15b0a/python/mypy/issues/5311 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/05ebd25b3a513339b9b8700792e19bcdbc2ef16eb9a930c80545c9195af15b0a/python/mypy/issues/5311 |
| og:image:alt | Example: dct = {"": ""} # ok trans = str.maketrans(dct) "".translate(trans) # err "".translate(str.maketrans(dct)) What is the actual behavior/output? maketrans.py:8: error: Argument 1 to "maketran... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | z33ky |
| 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