Fix typos and move enum stage to avoid conflict#167
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76ea00268c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| from pytfe.models.policy_evaluation import PolicyEvaluation | ||
| from pytfe.models.run import Run | ||
| from pytfe.models.run_task import Stage |
There was a problem hiding this comment.
Preserve legacy task-stage enum members
Importing Stage from run_task replaces the previously exported task_stage.Stage members (pre_plan, post_plan, etc.) with uppercase members (PRE_PLAN, ...). Any existing client code that does from pytfe.models.task_stage import Stage and references Stage.pre_plan will now raise AttributeError at runtime, which is a breaking API change for a 1.x SDK unless a compatibility alias/shim is kept.
Useful? React with 👍 / 👎.
| capabilities: RunTaskRequestCapabilities = Field( | ||
| default_factory=lambda: RunTaskRequestCapabilities(outcomes=False), | ||
| alias="capabilities", | ||
| description="The capabilities that the caller supports", |
There was a problem hiding this comment.
Keep backward alias for misspelled capabilities key
Changing the field/alias to capabilities removes support for the old capabilitites spelling with no fallback (validation_alias/alias choice), so persisted payloads or caller code built against earlier SDK versions will fail deserialization or attribute access after upgrade. For a typo fix in a stable SDK, this should remain backward-compatible (for at least one deprecation cycle) to avoid runtime breakage.
Useful? React with 👍 / 👎.
No description provided.