Title: Recognize platform.system() as well as sys.platform · Issue #8166 · python/mypy · GitHub
Open Graph Title: Recognize platform.system() as well as sys.platform · Issue #8166 · python/mypy
X Title: Recognize platform.system() as well as sys.platform · Issue #8166 · python/mypy
Description: Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues Please provide more information to help ...
Open Graph Description: Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues ...
X Description: Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues ...
Opengraph URL: https://github.com/python/mypy/issues/8166
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Recognize platform.system() as well as sys.platform","articleBody":"Note: if you are reporting a wrong signature of a function or a class in\r\nthe standard library, then the typeshed tracker is better suited\r\nfor this report: https://github.com/python/typeshed/issues\r\n\r\nPlease provide more information to help us understand the issue:\r\n\r\n* Are you reporting a bug, or opening a feature request? feature request\r\n* Please insert below the code you are checking with mypy,\r\n or a mock-up repro if the source is private. We would appreciate\r\n if you try to simplify your case to a minimal repro.\r\n```python\r\n if platform.system() != \"Windows\": # sys.platform != \"win32\":\r\n try:\r\n # os.confstr(\"CS_GNU_LIBC_VERSION\") returns a string like \"glibc 2.17\".\r\n version_string = os.confstr(\"CS_GNU_LIBC_VERSION\")\r\n assert version_string is not None\r\n _, version = version_string.split()\r\n except (AssertionError, OSError, ValueError):\r\n # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)...\r\n return None\r\n return version\r\n return None\r\n```\r\n* What is the actual behavior/output? \"error: Module has no attribute \"confstr\"\"\r\n* What is the behavior/output you expect? No error when run under Windows\r\n* What are the versions of mypy and Python you are using? mypy 0.750, Python 3.7.4\r\n\r\nBasically it would be nice to get to use `platform.system()` instead of having to use `sys.platform` to make mypy happy with code that is conditional on the platform.","author":{"url":"https://github.com/brettcannon","@type":"Person","name":"brettcannon"},"datePublished":"2019-12-17T23:53:13Z","url":"https://github.com/python/mypy/issues/8166"}
| 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:216ba43f-b776-8577-7f9c-e75d7480b57b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D26A:3022B5:CD114F:10E2B79:6AFFFB65 |
| html-safe-nonce | e18fb57950c86fa51a71a75e87f78baeca04efbccc872ba9764eabf56d58a5ec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjZBOjMwMjJCNTpDRDExNEY6MTBFMkI3OTo2QUZGRkI2NSIsInZpc2l0b3JfaWQiOiI3NjIxMzc4NDYwMTk5NDE4NzI1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 143ffa4270c44f557f68a0fe005eb838ce5d867eb41ea778a3d4660d76d6797a |
| hovercard-subject-tag | issue:539373398 |
| 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/8166/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bfeb67cb34fd0e93ab735d621ee572069e9f6dcc6023ab83d039f69ff9d3c7d1/python/mypy/issues/8166 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bfeb67cb34fd0e93ab735d621ee572069e9f6dcc6023ab83d039f69ff9d3c7d1/python/mypy/issues/8166 |
| og:image:alt | Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | brettcannon |
| 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