feat(generated): AuditLogs (batch 56391ebd) - #690
Conversation
Greptile SummaryThis auto-generated PR regenerates the Python SDK from spec changes, primarily adding
Confidence Score: 4/5Safe to merge; the only concern is namespace pollution from wildcard imports in files that lack The audit log and manifest changes are straightforward. The export refactoring is the riskier part: three of the four new wildcard imports come from files without src/workos/pipes/models/init.py and src/workos/sso/models/init.py — both introduce wildcard imports from source files that do not define Important Files Changed
|
|
|
||
| from .connected_account import * # noqa: F401,F403 | ||
| from .connected_account_dto import * # noqa: F401,F403 | ||
| from workos.common.models.connected_account import ConnectedAccount as ConnectedAccount | ||
| from .connected_account_dto import ConnectedAccountDto as ConnectedAccountDto | ||
| from .create_data_integration import CreateDataIntegration as CreateDataIntegration | ||
| from .custom_provider_definition import ( | ||
| CustomProviderDefinition as CustomProviderDefinition, | ||
| ) | ||
| from .data_integration_credentials_dto import * # noqa: F401,F403 | ||
| from .data_integration import DataIntegration as DataIntegration | ||
| from .data_integration_access_token_response import ( | ||
| DataIntegrationAccessTokenResponse as DataIntegrationAccessTokenResponse, |
There was a problem hiding this comment.
Wildcard imports from files without
__all__ pollute module namespace
connected_account_dto.py and data_integration_credentials_dto.py do not define __all__, so from .connected_account_dto import * and from .data_integration_credentials_dto import * will export every public name in those files — including Enum, datetime, dataclass, Any, Dict, List, Optional, ConnectedAccountState, and DataIntegrationCredentialsType — into workos.pipes.models. Any downstream from workos.pipes.models import * would then unexpectedly pick up these typing/stdlib names. Adding __all__ = ["ConnectedAccountDto"] (and similarly for the DTO) to the source files would scope the export correctly, matching the approach already used by data_integration_credentials_type.py.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/workos/pipes/models/__init__.py
Line: 2-13
Comment:
**Wildcard imports from files without `__all__` pollute module namespace**
`connected_account_dto.py` and `data_integration_credentials_dto.py` do not define `__all__`, so `from .connected_account_dto import *` and `from .data_integration_credentials_dto import *` will export every public name in those files — including `Enum`, `datetime`, `dataclass`, `Any`, `Dict`, `List`, `Optional`, `ConnectedAccountState`, and `DataIntegrationCredentialsType` — into `workos.pipes.models`. Any downstream `from workos.pipes.models import *` would then unexpectedly pick up these typing/stdlib names. Adding `__all__ = ["ConnectedAccountDto"]` (and similarly for the DTO) to the source files would scope the export correctly, matching the approach already used by `data_integration_credentials_type.py`.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| # This file is auto-generated by oagen. Do not edit. | ||
|
|
||
| from .connection import Connection as Connection | ||
| from .connection_option import * # noqa: F401,F403 |
There was a problem hiding this comment.
Wildcard import without
__all__ leaks stdlib names into workos.sso.models
connection_option.py has no __all__, so from .connection_option import * exports ConnectionOption plus dataclass, Any, Dict, and Optional into the workos.sso.models namespace. Defining __all__ = ["ConnectionOption"] in connection_option.py would match the contained pattern already used by data_integration_credentials_type.py and avoid unexpected names appearing in the public interface.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/workos/sso/models/__init__.py
Line: 4
Comment:
**Wildcard import without `__all__` leaks stdlib names into `workos.sso.models`**
`connection_option.py` has no `__all__`, so `from .connection_option import *` exports `ConnectionOption` plus `dataclass`, `Any`, `Dict`, and `Optional` into the `workos.sso.models` namespace. Defining `__all__ = ["ConnectionOption"]` in `connection_option.py` would match the contained pattern already used by `data_integration_credentials_type.py` and avoid unexpected names appearing in the public interface.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Regenerated SDK from spec changes.
Triggered by workos/openapi-spec@be67bca