Title: bogus complaint when checking Callable arguments · Issue #18689 · python/mypy · GitHub
Open Graph Title: bogus complaint when checking Callable arguments · Issue #18689 · python/mypy
X Title: bogus complaint when checking Callable arguments · Issue #18689 · python/mypy
Description: Bug Report mypy complains about correct code. it confuses the arguments to a Callable parameter with the return value of the function. To Reproduce https://gist.github.com/mypy-play/59b8705d6737e1f8f4855d7b2270e7e9 Expected Behavior Code...
Open Graph Description: Bug Report mypy complains about correct code. it confuses the arguments to a Callable parameter with the return value of the function. To Reproduce https://gist.github.com/mypy-play/59b8705d6737e1f...
X Description: Bug Report mypy complains about correct code. it confuses the arguments to a Callable parameter with the return value of the function. To Reproduce https://gist.github.com/mypy-play/59b8705d6737e1f...
Opengraph URL: https://github.com/python/mypy/issues/18689
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bogus complaint when checking Callable arguments","articleBody":"**Bug Report**\n\nmypy complains about correct code. it confuses the arguments to a Callable parameter with the return value of the function.\n\n**To Reproduce**\n\nhttps://gist.github.com/mypy-play/59b8705d6737e1f8f4855d7b2270e7e9\n\n**Expected Behavior**\n\nCode checks OK.\n\n**Actual Behavior**\n\nBogus error: \nArgument 1 to \"test\" has incompatible type \"Callable[[str], bool]\"; expected \"Callable[[float | str], bool]\" [arg-type]\n\n\n**Your Environment**\n\nmypy 1.15.0 (compiled: yes)\nPython 3.13.2\n","author":{"url":"https://github.com/MarcelloPerathoner","@type":"Person","name":"MarcelloPerathoner"},"datePublished":"2025-02-16T19:22:05Z","url":"https://github.com/python/mypy/issues/18689"}
| 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:00ba8b24-fd7c-6b1c-0d74-c1f2ca2263df |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9D5C:3AC034:B7868:FB67A:6B001C87 |
| html-safe-nonce | fe838ddab5a7d3e78f7a5aa992eb1b540373fe01ff6b93e9455a9a225f6fc0c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDVDOjNBQzAzNDpCNzg2ODpGQjY3QTo2QjAwMUM4NyIsInZpc2l0b3JfaWQiOiIyOTkxNDAwNDEyMjgxNTc2NTg0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0ff7b1cfddfca484eab1f57be1a688d4abf1645810077206903b06062d496e5c |
| hovercard-subject-tag | issue:2856284795 |
| 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/18689/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3ca1419c603f9e7438d8e60ba3c1a2b92031c30f8d65ac7d6b577b3cbf47e698/python/mypy/issues/18689 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3ca1419c603f9e7438d8e60ba3c1a2b92031c30f8d65ac7d6b577b3cbf47e698/python/mypy/issues/18689 |
| og:image:alt | Bug Report mypy complains about correct code. it confuses the arguments to a Callable parameter with the return value of the function. To Reproduce https://gist.github.com/mypy-play/59b8705d6737e1f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MarcelloPerathoner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width