Title: Using reveal_type with no errors should return exit code 0 · Issue #10013 · python/mypy · GitHub
Open Graph Title: Using reveal_type with no errors should return exit code 0 · Issue #10013 · python/mypy
X Title: Using reveal_type with no errors should return exit code 0 · Issue #10013 · python/mypy
Description: Bug Report When using pytest-mypy to test some dynamically determined types (with generics) results in a false-positive error in CI, because mypy's exit code becomes 1 when there are no errors but only reveal_type outputs. To Reproduce J...
Open Graph Description: Bug Report When using pytest-mypy to test some dynamically determined types (with generics) results in a false-positive error in CI, because mypy's exit code becomes 1 when there are no errors but ...
X Description: Bug Report When using pytest-mypy to test some dynamically determined types (with generics) results in a false-positive error in CI, because mypy's exit code becomes 1 when there are no errors ...
Opengraph URL: https://github.com/python/mypy/issues/10013
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Using reveal_type with no errors should return exit code 0","articleBody":"**Bug Report**\r\n\r\nWhen using [pytest-mypy](https://github.com/dbader/pytest-mypy) to test some dynamically determined types (with generics) results in a false-positive error in CI, because mypy's exit code becomes 1 when there are no errors but only `reveal_type` outputs.\r\n\r\n**To Reproduce**\r\n\r\nJust write an arbitrary Python file that has *no* type errors and put `reveal_type()` to any one of the identifiers.\r\nRun mypy against that file and check the exit code.\r\n\r\nI'd like to keep `reveal_type()` in my code, to test a mixture of runtime type validation and static typing results using `typeguard`, generics, and `pytest-mypy` plugin.\r\n\r\n**Expected Behavior**\r\n\r\nWhen there are no errors but only some `reveal_type` outputs, `mypy` executable should set the exit code 0.\r\n\r\n**Actual Behavior**\r\n\r\nIt sets the exit code 1, breaking my CI.\r\n\r\n\r\n**Your Environment**\r\n\r\n- Mypy version used: 0.800\r\n- Mypy command-line flags and options:\r\n```dosini\r\n[mypy]\r\nignore_missing_imports = true\r\nmypy_path = stubs,src\r\nnamespace_packages = true\r\nexplicit_package_bases = true\r\n```\r\n- Python version used: 3.9.1\r\n- Operating system and version: Ubuntu 20.04","author":{"url":"https://github.com/achimnol","@type":"Person","name":"achimnol"},"datePublished":"2021-02-03T11:08:22Z","url":"https://github.com/python/mypy/issues/10013"}
| 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:110e938e-b3f1-1c8d-35e1-39f934d5b7c9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E22:DD1C:1F47998:2A673D1:6B00196A |
| html-safe-nonce | ba61f5174caa23d5eb679990d2954145af75f391b230421e9e57845af81184f7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTIyOkREMUM6MUY0Nzk5ODoyQTY3M0QxOjZCMDAxOTZBIiwidmlzaXRvcl9pZCI6IjE4NzMxODQ0NzY4MDk0MDI3MzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 76d77116429ab29cc1feede29ebd669c898c8b11df85f24156b0163a5aed09a3 |
| hovercard-subject-tag | issue:800223848 |
| 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/10013/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dde271f7b1f0d1a0084733794fdab80cb70af1e8a968609dbe6cdebb127a326e/python/mypy/issues/10013 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dde271f7b1f0d1a0084733794fdab80cb70af1e8a968609dbe6cdebb127a326e/python/mypy/issues/10013 |
| og:image:alt | Bug Report When using pytest-mypy to test some dynamically determined types (with generics) results in a false-positive error in CI, because mypy's exit code becomes 1 when there are no errors but ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | achimnol |
| hostname | github.com |
| expected-hostname | github.com |
| None | a2dd2291b1b13cc9c06f27ec92fa3dbaf34116fc24c9347b8539db61884c59f4 |
| 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 | 70121d4e855ee0bb7b75cf15d061d91f8863c0f8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width