Skip to content

docs: drop flytekit references from public docstrings; fix a flytekit import - #1633

Merged
kumare3 merged 2 commits into
mainfrom
peeter/docstrings-drop-flytekit
Oct 1, 2026
Merged

kumare3 merged 2 commits into
mainfrom
peeter/docstrings-drop-flytekit

Conversation

@ppiegaze

@ppiegaze ppiegaze commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

What

Seven docstrings on public classes still described flytekit. The API reference publishes them verbatim, so the wording shows up on about 20 pages: flyte.io.extend.DataFrameEncoder / DataFrameDecoder / DataFrameTransformerEngine, flyte.types.TypeEngine / TypeTransformer / FlytePickle, and every plugin encoder/decoder that inherits the base docstring (BigQuery, Polars, Spark). The TypeEngine, TypeTransformer and FlytePickle phrases are also those pages' one-line summaries, so they appear in index tables and search results.

  • "flytekit type engine / type system / data persistence layer" → Flyte equivalents
  • DataFrameEncoder said "for the other way, see the DataFrameEncoder"; it now points at DataFrameDecoder
  • "transformer enginer" typo
  • DataFrameTransformerEngine.register ended mid-sentence ("…field, then"); it now says an unspecified protocol registers the handler for every protocol, which is what the code does

Bug fix

PythonDependencyRenderer.to_html() imported flytekit.loggers, so it raised ModuleNotFoundError: No module named 'flytekit' wherever flytekit isn't installed (reproduced on main). It now uses flyte._logging. New tests in tests/flyte/types/test_renderer.py cover the success and pip-failure paths; both fail on main and pass here.

The private flyte._utils.asyn module docstring's example now imports run_sync from flyte.

Error messages

Four user-facing error messages in _type_engine.py said "Flytekit" (dataclass encode/decode, enum annotations, dict implicit conversion); they now say "Flyte". No test matches on this text. The enum message also used backslash continuations inside the string, which put runs of spaces into the message; it is now one line.

Not changed

Comments and links to flytekit PRs that explain history are left alone.

Checks

pytest tests/flyte/types tests/flyte/type_engine tests/user_api (1301 passed), make check-docstrings, ruff format --check, ruff check, codespell.

🤖 Generated with Claude Code

ppiegaze and others added 2 commits September 30, 2026 16:50
… import

Seven docstrings on public classes still described flytekit's type engine,
and the API reference publishes them verbatim (flyte.io.extend and
flyte.types pages, plus every plugin encoder/decoder that inherits them).
They now say Flyte. The Encoder docstring pointed back at itself for "the
other way"; it now points at DataFrameDecoder. Also fixes the "enginer"
typo and completes the dangling sentence in DataFrameTransformerEngine.register.

PythonDependencyRenderer.to_html imported flytekit.loggers, so it raised
ModuleNotFoundError wherever flytekit is not installed. It now uses
flyte._logging. Adds tests for it.

The asyn.py module docstring's example now imports run_sync from flyte.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com>
Users see these when a dataclass, enum or dict conversion fails. The enum
message also used backslash continuations inside the string, which put
runs of spaces into the message; it is now one line.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com>
@kumare3
kumare3 merged commit 564c77e into main Oct 1, 2026
65 checks passed
@kumare3
kumare3 deleted the peeter/docstrings-drop-flytekit branch October 1, 2026 23:36
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.

3 participants