-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: reachability recognizes platform.system() #10686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
It's worth calling out that we don't add platform.system() to options (see comments on #8461) and use its value directly. Instead, we map sys.platform to platform.system(). This mapping isn't perfect and mypy behavior is not exactly the same between the two. Consider the following:
|
Note for reviewers: Instead of hard-coding |
This comment has been minimized.
This comment has been minimized.
Diff from mypy_primer, showing the effect of this PR on open source code: urllib3 (https://github.com/urllib3/urllib3)
+ test/conftest.py:28: error: Unused "type: ignore" comment
pytest (https://github.com/pytest-dev/pytest.git)
+ src/_pytest/doctest.py:302: error: Statement is unreachable [unreachable]
|
Description
As title. Closes #8166. See PRs #8461 and python/typeshed#5671 for context
Test Plan
Duplicated all existing sys.platform test cases (minus the one that tests for sys.platform.startswith) and added several to ensure a valid mapping of sys.platform to platform.system()