<#27 Fix skills referencing non-existent flyte.Fil...
# flyte-github
a
#27 Fix skills referencing non-existent flyte.File / flyte.Directory / flyte.DataFrame / flyte.condition (#25) Pull request opened by cosmicBboy Fixes #25. The SDK skills referenced top-level
flyte.File
,
flyte.Directory
,
flyte.DataFrame
, and
flyte.condition
— none of which the
flyte
2.x SDK exports. Agents that read these skills generated code that fails immediately (
AttributeError: module 'flyte' has no attribute 'File'
). Taking direction (1) from the issue: fix the skills to match what the SDK actually exports. Changes (9 SDK skills) | Wrong | Correct | Notes | | -------------------- | ------------------------------------------------- | ------------------------------------------------- | | flyte.File | flyte.io.File | 114 refs | | flyte.Directory | flyte.io.Dir | 9 refs — not flyte.io.Directory (doesn't exist) | | flyte.DataFrame | flyte.io.DataFrame | 72 refs | | flyte.condition(...) | flyte.new_condition(...) + await condition.wait() | rewritten, not renamed | Beyond the issue's mechanical substitutions, two things the issue's suggested fix would have missed: 1.
import flyte
does not expose
flyte.io
.
A bare
flyte.io.File
after only
import flyte
still throws
AttributeError: module 'flyte' has no attribute 'io'
. Added
import flyte.io
to every runnable example (21 blocks) that used
flyte.io.*
but only imported
flyte
. Partial snippets without an
import flyte
anchor are left as-is. 2. Bug 4 needed a real rewrite, not a rename. The old example used
flyte.condition("name", ...)
returning
result.approved
. The actual API (from the SDK's own docstring) is: condition = await flyte.new_condition(name, prompt=..., data_type=bool, timeout=timedelta(hours=24)) approved = await condition.wait() Also updated the
flyte-sdk-agent
routing-table reference to
flyte.new_condition
. The Grounding-References preamble search-example symbol (
flyte.File
→
flyte.io.File
) is fixed too, so the
flyte-docs
literal-substring search actually returns hits now. Verification • Zero wrong top-level symbols remain repo-wide; no
flyte.io.io.*
double-prefix. •
flyte.io.File
/
flyte.io.Dir
/
flyte.io.DataFrame
/
flyte.new_condition
confirmed present in the installed SDK. • Every runnable
flyte.io.*
block imports the submodule (checked programmatically: 0 violations). • Static-tier lint: 20/20 skills pass (frontmatter valid, all Python fences
ast.parse
cleanly). • No migration skills touched (they already used
flyte.io.*
correctly). Out of scope The issue's PS notes two narrative lines in the docs sites'
llms-full.txt
(
flyteorg/flyte
and Union docs repos) — those live in other repos, not here, so they're not addressed by this PR. 🤖 Generated with Claude Code flyteorg/flyte-agent-plugins