René's URL Explorer Experiment


Title: Odd error message when kwargs passed as **dict · Issue #5382 · python/mypy · GitHub

Open Graph Title: Odd error message when kwargs passed as **dict · Issue #5382 · python/mypy

X Title: Odd error message when kwargs passed as **dict · Issue #5382 · python/mypy

Description: Checking this with mypy 0.620: from concurrent.futures import ThreadPoolExecutor import sys opts = {'max_workers': None} if sys.version_info >= (3, 6): opts['thread_name_prefix'] = 'SyncWorker' executor = ThreadPoolExecutor(**opts) ...yi...

Open Graph Description: Checking this with mypy 0.620: from concurrent.futures import ThreadPoolExecutor import sys opts = {'max_workers': None} if sys.version_info >= (3, 6): opts['thread_name_prefix'] = 'SyncWorker' exe...

X Description: Checking this with mypy 0.620: from concurrent.futures import ThreadPoolExecutor import sys opts = {'max_workers': None} if sys.version_info >= (3, 6): opts['thread_name_prefix']...

Opengraph URL: https://github.com/python/mypy/issues/5382

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Odd error message when kwargs passed as **dict","articleBody":"Checking this with mypy 0.620:\r\n```python\r\nfrom concurrent.futures import ThreadPoolExecutor\r\nimport sys\r\n\r\nopts = {'max_workers': None}\r\nif sys.version_info >= (3, 6):\r\n    opts['thread_name_prefix'] = 'SyncWorker'\r\nexecutor = ThreadPoolExecutor(**opts)\r\n```\r\n...yields:\r\n```\r\nmypy_bug.py:6: error: Incompatible types in assignment (expression has type \"str\", target has type \"None\")\r\nmypy_bug.py:7: error: Argument 1 to \"ThreadPoolExecutor\" has incompatible type \"**Dict[str, None]\"; expected \"str\"\r\n```\r\nLet's ignore the first error for now. But the second seems to have an incorrect message, specifically I think the **Dict[str, None] in it is weird. Just guessing, is it trying to assign something to the ThreadPoolExecutor's thread_name_prefix arg which is a str? Maybe the None from max_workers because passing kwargs as a dict like this might result in random/varying order of the dict items? But if that's the case, I'd expect it to say something else than **Dict[str, None] as the culprit, maybe None or int, but not the whole **dict.\r\n\r\nAnother thought is that when kwargs is passed as **dicts like this, their order is not really defined, so \"Argument 1\" isn't very helpful. Would be better to say the argument's name.\r\n\r\nBut maybe I'm just all off track here -- will leave the rest to someone who actually has an informed opinion :)","author":{"url":"https://github.com/scop","@type":"Person","name":"scop"},"datePublished":"2018-07-22T09:50:01Z","url":"https://github.com/python/mypy/issues/5382"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2a967c48-6b39-4165-53f3-ceca91b6cc34
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE8F2:1A6297:1058D7E:1582599:6B000967
html-safe-nonceed1512b5c13a2fc5fbc050c9b995dbc2ac9de5c8b55109a2fac9d78d072bb977
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEYyOjFBNjI5NzoxMDU4RDdFOjE1ODI1OTk6NkIwMDA5NjciLCJ2aXNpdG9yX2lkIjoiNzk4ODc4MTg1OTc1ODY3MjIzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac60b12ef0a83084beb847c43a643752f2d45413326d8aac73443f3765ddbce3ab
hovercard-subject-tagissue:343392754
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/5382/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1a111c7e3efd83e0b2d3f4503932f3cd158e9004b436b460dccf577d3f6bf343/python/mypy/issues/5382
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1a111c7e3efd83e0b2d3f4503932f3cd158e9004b436b460dccf577d3f6bf343/python/mypy/issues/5382
og:image:altChecking this with mypy 0.620: from concurrent.futures import ThreadPoolExecutor import sys opts = {'max_workers': None} if sys.version_info >= (3, 6): opts['thread_name_prefix'] = 'SyncWorker' exe...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamescop
hostnamegithub.com
expected-hostnamegithub.com
None0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729
turbo-cache-controlno-preview
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release16a11879678aaf97e2a42c33ee70830aa084fa37
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/5382#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F5382
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F5382
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fmypy
Reloadhttps://github.com/python/mypy/issues/5382
Reloadhttps://github.com/python/mypy/issues/5382
Reloadhttps://github.com/python/mypy/issues/5382
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests547 (547)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/5382
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/5382
Odd error message when kwargs passed as **dicthttps://github.com/python/mypy/issues/5382#top
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%22
topic-callsFunction calls, *args, **kwargs, defaultshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-calls%22
topic-usabilityhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-usability%22
https://github.com/scop
scophttps://github.com/scop
on Jul 22, 2018https://github.com/python/mypy/issues/5382#issue-343392754
Nexthttps://github.com/python/mypy/issues/5382?timeline_page=1
https://github.com/scop
scophttps://github.com/scop
on Jul 22, 2018https://github.com/python/mypy/issues/5382#issuecomment-406854024
https://github.com/radzak
radzakhttps://github.com/radzak
on Jul 22, 2018https://github.com/python/mypy/issues/5382#issuecomment-406862474
@scophttps://github.com/scop
this SO questionhttps://stackoverflow.com/questions/43910979/mypy-error-incompatible-types-in-assignment
stubhttps://github.com/python/typeshed/blob/1a8455b444e9866e824da72c5c5ee59b0e4a4f66/stdlib/3/concurrent/futures/thread.pyi
https://github.com/akaptur
akapturhttps://github.com/akaptur
on Aug 30, 2018https://github.com/python/mypy/issues/5382#issuecomment-417433738
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Aug 30, 2018https://github.com/python/mypy/issues/5382#issuecomment-417452272
#5198https://github.com/python/mypy/issues/5198
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Aug 30, 2018https://github.com/python/mypy/issues/5382#issuecomment-417453043
ilevkivskyihttps://github.com/ilevkivskyi
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
priority-2-lowhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-2-low%22
on Aug 30, 2018https://github.com/python/mypy/issues/5382#event-1819147568
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Oct 21, 2018https://github.com/python/mypy/issues/5382#issuecomment-431701846
ilevkivskyihttps://github.com/ilevkivskyi
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
topic-usabilityhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-usability%22
priority-2-lowhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-2-low%22
on Oct 21, 2018https://github.com/python/mypy/issues/5382#event-1916823417
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on May 13, 2019https://github.com/python/mypy/issues/5382#issuecomment-491768148
ilevkivskyihttps://github.com/ilevkivskyi
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
on May 13, 2019https://github.com/python/mypy/issues/5382#event-2336496539
https://github.com/w-p
w-phttps://github.com/w-p
on Feb 9, 2020https://github.com/python/mypy/issues/5382#issuecomment-583901369
https://github.com/zachliu
zachliuhttps://github.com/zachliu
on May 13, 2021https://github.com/python/mypy/issues/5382#issuecomment-840188199
MrMinohttps://github.com/MrMino
on Jul 25, 2021https://github.com/python/mypy/issues/5382#event-5065351443
Fix mypy false-positive in __build__.pyhttps://github.com/MrMino/wheelfile/commit/b0c52fecbb92989e261a95ac669557513889c08e
b0c52fehttps://github.com/MrMino/wheelfile/commit/b0c52fecbb92989e261a95ac669557513889c08e
https://github.com/derrix060
derrix060https://github.com/derrix060
on Nov 11, 2021https://github.com/python/mypy/issues/5382#issuecomment-966613372
#8890https://github.com/python/mypy/issues/8890
https://github.com/wereii
wereiihttps://github.com/wereii
on Jan 7, 2022https://github.com/python/mypy/issues/5382#issuecomment-1007478001
JelleZijlstrahttps://github.com/JelleZijlstra
topic-callsFunction calls, *args, **kwargs, defaultshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-calls%22
on Mar 19, 2022https://github.com/python/mypy/issues/5382#event-6270104205
https://github.com/adamwojt
adamwojthttps://github.com/adamwojt
on May 18, 2022https://github.com/python/mypy/issues/5382#issuecomment-1130281322
https://github.com/mastercoms
mastercomshttps://github.com/mastercoms
on Jan 30, 2023https://github.com/python/mypy/issues/5382#issuecomment-1408241959
https://github.com/aripollak
aripollakhttps://github.com/aripollak
on Nov 15, 2023https://github.com/python/mypy/issues/5382#issuecomment-1813423433
https://github.com/python/mypy/blob/master/CHANGELOG.md#mypy-17https://github.com/python/mypy/blob/master/CHANGELOG.md#mypy-17
sterliakovhttps://github.com/sterliakov
False positive with **kwargs with multiple arguments #18759https://github.com/python/mypy/issues/18759
on Apr 5, 2025https://github.com/python/mypy/issues/5382#event-17138204230
bradenmacdonaldhttps://github.com/bradenmacdonald
on Jun 11, 2025https://github.com/python/mypy/issues/5382#event-18099548252
fix: quality/typing issue (work around mypy limitation)https://github.com/open-craft/openedx-core/commit/6d793f30e33bdb9d24954221a43efe04f3444883
6d793f3https://github.com/open-craft/openedx-core/commit/6d793f30e33bdb9d24954221a43efe04f3444883
jhlegarretahttps://github.com/jhlegarreta
on Oct 13, 2025https://github.com/python/mypy/issues/5382#event-20255098615
STY: Ignore type checking error when passing keyword argumentshttps://github.com/jhlegarreta/nifreeze/commit/a42ad1e7e26ad9fe67084822592d1001d3e38d88
a42ad1ehttps://github.com/jhlegarreta/nifreeze/commit/a42ad1e7e26ad9fe67084822592d1001d3e38d88
STY: Ignore type checking error when passing keyword argumentshttps://github.com/jhlegarreta/nifreeze/commit/a746a61624d828e2fa3af5319e05a423f615450a
a746a61https://github.com/jhlegarreta/nifreeze/commit/a746a61624d828e2fa3af5319e05a423f615450a
A5rockshttps://github.com/A5rocks
Passing an unpacked dictionary and keyword arguments to **kwargs gets unexpected errors #20650https://github.com/python/mypy/issues/20650
on Jan 25, 2026https://github.com/python/mypy/issues/5382#event-22277307747
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Oct 2, 2026https://github.com/python/mypy/issues/5382#issuecomment-5954447194
#5382 (comment)https://github.com/python/mypy/issues/5382#issuecomment-417452272
ilevkivskyihttps://github.com/ilevkivskyi
Clash between keyword arguments and catch-all kwargs #22086https://github.com/python/mypy/issues/22086
on Oct 2, 2026https://github.com/python/mypy/issues/5382#event-32340439371
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/5382
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/5382
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%22
topic-callsFunction calls, *args, **kwargs, defaultshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-calls%22
topic-usabilityhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-usability%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.