feat(generated): use explicit re-export form in service __init__.py#645
Merged
gjtorikian merged 1 commit intomainfrom May 1, 2026
Merged
Conversation
Regenerates all 19 service `__init__.py` files to use the PEP 484 explicit re-export form (`from ._resource import X as X`) instead of bare imports. Without the `as X` aliasing, pyright in strict mode flags imports like `from workos.user_management import RoleSingle` as private-import violations (`reportPrivateImportUsage`). The models barrel already used the explicit form — this change makes the resource barrel match. Mechanical change only — no API surface changes. Generated by oagen after workos/oagen-emitters#70 lands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Greptile SummaryConverts all 19 service Confidence Score: 5/5Safe to merge — pure re-export form change with no runtime behaviour differences. All 20 changed files are auto-generated barrel modules. The edits are mechanical and exhaustively consistent across every service module. No logic, API surface, or security concerns are affected. No files require special attention. Important Files Changed
|
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Blocked on workos/oagen-emitters#70 landing and being released. This PR is the regenerated output that change produces. Marking as draft until the emitter release is out and the dependency in
oagen.config.tsis bumped.Summary
__init__.pyfiles to use the PEP 484 explicit re-export form (from ._resource import X as X)reportPrivateImportUsagewarnings under strict mode for direct imports of resource-level dataclassesWhy
Customer reported that
from workos.user_management import RoleSingle, RoleMultipletriggers a private-import warning under strict pyright. PEP 484 requires either__all__orX as Xaliasing for a name to be considered a public re-export.The same bug existed in every service
__init__.py(not justuser_management) — anyone doingfrom workos.authorization import ResourceTargetById, ParentByExternalId, ...hits the same warning.What changed
Mechanical, generator-driven edits across 19 service barrels. Example:
No API surface changes. No spec changes. Pure re-export form change.
Test plan
uv run pytest— 1987 tests passuv run pyright— 0 errors, 0 warnings# pyright: strict) on a consumer file no longer warns onfrom workos.user_management import RoleSingle, RoleMultipleorfrom workos.authorization import ResourceTargetById🤖 Generated with Claude Code