Title: [BUG] False positive mypy error when using telegram.ext · Issue #2580 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: [BUG] False positive mypy error when using telegram.ext · Issue #2580 · python-telegram-bot/python-telegram-bot
X Title: [BUG] False positive mypy error when using telegram.ext · Issue #2580 · python-telegram-bot/python-telegram-bot
Description: Steps to reproduce Install mypy Write import telegram.ext and var = telegram.ext.CallbackContext() Run mypy Expected behaviour Only the error Too few arguments for "CallbackContext" [call-arg] (3:7) should be thrown. I'm pretty sure this...
Open Graph Description: Steps to reproduce Install mypy Write import telegram.ext and var = telegram.ext.CallbackContext() Run mypy Expected behaviour Only the error Too few arguments for "CallbackContext" [call-arg] (3:7...
X Description: Steps to reproduce Install mypy Write import telegram.ext and var = telegram.ext.CallbackContext() Run mypy Expected behaviour Only the error Too few arguments for "CallbackContext" [call...
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/2580
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] False positive mypy error when using telegram.ext","articleBody":"\u003c!--\r\nThanks for reporting issues of python-telegram-bot!\r\n\r\nUse this template to notify us if you found a bug.\r\n\r\nTo make it easier for us to help you please enter detailed information below.\r\n\r\nPlease note, we only support the latest version of python-telegram-bot and\r\nmaster branch. Please make sure to upgrade & recreate the issue on the latest\r\nversion prior to opening an issue.\r\n-->\r\n### Steps to reproduce\r\n\r\n1. Install `mypy`\r\n2. Write `import telegram.ext` and `var = telegram.ext.CallbackContext()`\r\n3. Run `mypy`\r\n\r\n### Expected behaviour\r\n\r\nOnly the error\r\n```\r\nToo few arguments for \"CallbackContext\" [call-arg] (3:7)\r\n```\r\nshould be thrown.\r\n\r\nI'm pretty sure this used to be ok in a previous version.\r\n\r\n### Actual behaviour\r\n\r\nThe errors\r\n```\r\nToo few arguments for \"CallbackContext\" [call-arg] (3:7)\r\nNeed type annotation for 'var' [var-annotated] (3:7)\r\n```\r\nare thrown.\r\n\r\n### Configuration\r\n**Operating System:**\r\n\r\nmacOS 11.4 (20F71)\r\n\r\n**Version of Python, python-telegram-bot & dependencies:**\r\n\r\n```\r\npython-telegram-bot 13.7\r\nBot API 5.3\r\ncertifi 2020.12.05\r\nPython 3.9.5 (default, May 4 2021, 03:36:27) [Clang 12.0.0 (clang-1200.0.32.29)]\r\n```\r\n\r\n### Logs\r\nInsert logs here (if necessary)\r\n","author":{"url":"https://github.com/revolter","@type":"Person","name":"revolter"},"datePublished":"2021-07-02T20:12:02Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/2580"}
| 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:1dcfdbdf-cd46-ebae-0fb4-1ac18d4caf19 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 883E:293912:840430:ACD778:6B0255DD |
| html-safe-nonce | 82e5d122d4b08392da1d259fa400264dccc75cfc8cf9fa1e618f6e5b9b3ccdfd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODNFOjI5MzkxMjo4NDA0MzA6QUNENzc4OjZCMDI1NUREIiwidmlzaXRvcl9pZCI6IjQ5MDI1OTM5NDY2ODQxODUyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5e823f0472e6ed42dcd2ac8d2134d3d5b662efadc6c999f1b7a710432df5b08b |
| hovercard-subject-tag | issue:936042805 |
| 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-telegram-bot/python-telegram-bot/2580/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6382aba733399a71e8bf8140835a684c87be0f571e0a58087a6d2ffd8a0212d9/python-telegram-bot/python-telegram-bot/issues/2580 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6382aba733399a71e8bf8140835a684c87be0f571e0a58087a6d2ffd8a0212d9/python-telegram-bot/python-telegram-bot/issues/2580 |
| og:image:alt | Steps to reproduce Install mypy Write import telegram.ext and var = telegram.ext.CallbackContext() Run mypy Expected behaviour Only the error Too few arguments for "CallbackContext" [call-arg] (3:7... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | revolter |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-telegram-bot/python-telegram-bot git https://github.com/python-telegram-bot/python-telegram-bot.git |
| octolytics-dimension-user_id | 16178365 |
| octolytics-dimension-user_login | python-telegram-bot |
| octolytics-dimension-repository_id | 38696925 |
| octolytics-dimension-repository_nwo | python-telegram-bot/python-telegram-bot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38696925 |
| octolytics-dimension-repository_network_root_nwo | python-telegram-bot/python-telegram-bot |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width