Title: Idea: allow assert with platform or version check at top of file · Issue #5308 · python/mypy · GitHub
Open Graph Title: Idea: allow assert with platform or version check at top of file · Issue #5308 · python/mypy
X Title: Idea: allow assert with platform or version check at top of file · Issue #5308 · python/mypy
Description: Some files only work for certain platforms, but sometimes it's inconvenient to move the file to a location where it'll only be picked up for that platform. And yet the file doesn't type check cleanly on another platform (or ditto for Pyt...
Open Graph Description: Some files only work for certain platforms, but sometimes it's inconvenient to move the file to a location where it'll only be picked up for that platform. And yet the file doesn't type check clean...
X Description: Some files only work for certain platforms, but sometimes it's inconvenient to move the file to a location where it'll only be picked up for that platform. And yet the file doesn't type...
Opengraph URL: https://github.com/python/mypy/issues/5308
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Idea: allow assert with platform or version check at top of file","articleBody":"Some files only work for certain platforms, but sometimes it's inconvenient to move the file to a location where it'll only be picked up for that platform. And yet the file doesn't type check cleanly on another platform (or ditto for Python versions).\r\n\r\nWe could enclose the entire file in `if sys.platform == 'win32':` but that seems overkill (and adding the indentation makes for an awkward diff). I propose an alternative that would have the same effect: `assert sys.platform == 'win32'`.","author":{"url":"https://github.com/gvanrossum","@type":"Person","name":"gvanrossum"},"datePublished":"2018-07-03T01:45:08Z","url":"https://github.com/python/mypy/issues/5308"}
| 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:450c7f97-04a3-d7fd-43d6-6f4bace60f69 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E412:184B81:25672E2:30D9FB7:6AFFFAE3 |
| html-safe-nonce | 7d0f2b840abab8d6e5908bd2b8e13f68f00375dd4ad038993dd97e33062384f9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDEyOjE4NEI4MToyNTY3MkUyOjMwRDlGQjc6NkFGRkZBRTMiLCJ2aXNpdG9yX2lkIjoiNjkxOTI0OTcyNjQ3OTAwNjQzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 987a1762ae1ab5fad582321ac74295db0512ba8642fcf9ac03144e0ff0c1f75a |
| hovercard-subject-tag | issue:337716552 |
| 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/5308/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ba9f20793b36eb41c945dda8ad151b49e1e0545067dde9e8799f1680fe1a2cdc/python/mypy/issues/5308 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ba9f20793b36eb41c945dda8ad151b49e1e0545067dde9e8799f1680fe1a2cdc/python/mypy/issues/5308 |
| og:image:alt | Some files only work for certain platforms, but sometimes it's inconvenient to move the file to a location where it'll only be picked up for that platform. And yet the file doesn't type check clean... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gvanrossum |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| 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 | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width