Problem
get_platform() (src/pythonnative/platform.py, line 135) is documented and unit-tested (tests/test_platform.py, lines 26-27), but it isn't re-exported from pythonnative/__init__.py, so pn.get_platform() raises AttributeError. Users have to reach into pythonnative.platform for it, unlike its sibling Platform.
Suggested fix
- Import get_platform in src/pythonnative/__init__.py alongside the existing Platform import and add "get_platform" to __all__ (the list starts around line 212).
- Every name in __all__ must be covered by the E2E suite or listed in INTENTIONAL_EXEMPTIONS in scripts/check-e2e-coverage.py (line 46). Since get_platform() is a thin functional alias of Platform.OS, add it there with a one-line justification, following the style of the existing entries.
- Optionally add a row for it on the Platform page in docs/api/platform.md.
Verification
- python scripts/check-e2e-coverage.py exits 0.
- A quick unit test that pn.get_platform() == pn.Platform.OS (or extend tests/test_platform.py).
- ./scripts/check.sh passes.
Suggested commit message
feat(package): export get_platform
Reactions are currently unavailable
Problem
get_platform() (src/pythonnative/platform.py, line 135) is documented and unit-tested (tests/test_platform.py, lines 26-27), but it isn't re-exported from pythonnative/__init__.py, so pn.get_platform() raises AttributeError. Users have to reach into pythonnative.platform for it, unlike its sibling Platform.
Suggested fix
Verification
Suggested commit message