Title: How to programatically run mypy in python? · Issue #2369 · python/mypy · GitHub
Open Graph Title: How to programatically run mypy in python? · Issue #2369 · python/mypy
X Title: How to programatically run mypy in python? · Issue #2369 · python/mypy
Description: Hi, I asked this question on the gitter chat originally, but I was redirected here. A lot of the classes in my library have metaclasses that have custom __isinstance__ and/or __issubclass__ methods so that they work in a certain way and ...
Open Graph Description: Hi, I asked this question on the gitter chat originally, but I was redirected here. A lot of the classes in my library have metaclasses that have custom __isinstance__ and/or __issubclass__ methods...
X Description: Hi, I asked this question on the gitter chat originally, but I was redirected here. A lot of the classes in my library have metaclasses that have custom __isinstance__ and/or __issubclass__ methods...
Opengraph URL: https://github.com/python/mypy/issues/2369
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to programatically run mypy in python?","articleBody":"Hi, I asked this question on the gitter chat originally, but I was redirected here.\n\nA lot of the classes in my library have metaclasses that have custom `__isinstance__` and/or `__issubclass__` methods so that they work in a certain way and I want to make sure that they will work with mypy. Mypy compatibility is really important to my library and I don't want to just assume they'll work because they pass my own isinstance checks and whatnot.\n\nSo my question is, is there is a way to run mypy in my unit tests so that I can assert that they work as expected? For example, I'm imagining something like:\n\n``` python\nfrom mypy import validator\n\ndef test_my_class():\n def foo() -> MyClass:\n # do some stuff\n return myclassinstance\n\n assert validator.run(foo, params={})\n```\n","author":{"url":"https://github.com/TheDan64","@type":"Person","name":"TheDan64"},"datePublished":"2016-10-28T17:38:06Z","url":"https://github.com/python/mypy/issues/2369"}
| 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:68d4d574-3cad-a647-7a9e-1446ad8fb9c2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 81D0:C5FC2:1AB0F36:2340E73:6B002FF0 |
| html-safe-nonce | b15ca368e387910f10a20640e3132ebe681abe66040b5d3ab7879a0871a7a886 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MUQwOkM1RkMyOjFBQjBGMzY6MjM0MEU3Mzo2QjAwMkZGMCIsInZpc2l0b3JfaWQiOiI0ODAzOTI3MTIzMjgwNjUwMDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d1d28e1588b6db39a63df9d0e689fb08a68138e601b22ae6cd3ade1ae1304ff0 |
| hovercard-subject-tag | issue:185979587 |
| 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/2369/issue_layout |
| twitter:image | https://opengraph.githubassets.com/53e5d9c5c21ea70ee89a89c8955afcfb63feb008ffd3efb572ecd3924d79ca91/python/mypy/issues/2369 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/53e5d9c5c21ea70ee89a89c8955afcfb63feb008ffd3efb572ecd3924d79ca91/python/mypy/issues/2369 |
| og:image:alt | Hi, I asked this question on the gitter chat originally, but I was redirected here. A lot of the classes in my library have metaclasses that have custom __isinstance__ and/or __issubclass__ methods... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TheDan64 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width