FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(package): export get_platform by glenlouis8 · Pull Request #48 · pythonnative/pythonnative · GitHub

feat(package): export get_platform - #48

Merged
owenthcarey merged 1 commit into
pythonnative:mainfrom
glenlouis8:feat/package-export-get-platform
Sep 3, 2026
Merged

owenthcarey merged 1 commit into
pythonnative:mainfrom
glenlouis8:feat/package-export-get-platform

Conversation

Copy link
Copy Markdown
Contributor

What

  • Re-export get_platform from the top-level pythonnative package.

Why

  • get_platform() in pythonnative.platform is documented and unit-tested, but it was never added to pythonnative/__init__.py, so pn.get_platform() raised AttributeError. This makes the documented call work.

How (brief)

  • src/pythonnative/__init__.py: import get_platform alongside Platform and add "get_platform" to __all__.
  • scripts/check-e2e-coverage.py: add get_platform to INTENTIONAL_EXEMPTIONS (thin functional alias of Platform.OS, no device surface).
  • tests/test_platform.py: add a test asserting pn.get_platform() == pn.Platform.OS through the package surface.

Testing

  • ./scripts/check.sh passes; python scripts/check-e2e-coverage.py exits 0.

Risks/Impact

  • Additive only. New public name, no behavior change to existing symbols.

Docs/Follow-ups

  • None; existing docs already reference pn.get_platform().

Closes #44

owenthcarey merged commit 05e2391 into pythonnative:main Sep 3, 2026
23 of 24 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export get_platform from the public package surface

2 participants


Back | FazBrowse Home | New Git URL