Skip to content

docs: import Literal in the metadata-expansion example#184

Open
FBISiri wants to merge 1 commit into
superlinear-ai:mainfrom
FBISiri:docs-import-literal
Open

docs: import Literal in the metadata-expansion example#184
FBISiri wants to merge 1 commit into
superlinear-ai:mainfrom
FBISiri:docs-import-literal

Conversation

@FBISiri

@FBISiri FBISiri commented Jun 26, 2026

Copy link
Copy Markdown

The "expand the document metadata" example in the README uses Literal[...] for the topics field but only imports Annotated from typing. Copy-pasting the snippet as-is raises NameError: name Literal is not defined.

This one-line fix adds Literal to the import so the example runs as written. Docs-only — no logic change.

Reproduction (before fix):

>>> from typing import Annotated
>>> Annotated[list[Literal["A"]], ...]
NameError: name Literal is not defined

Summary by CodeRabbit

  • Documentation
    • Updated the README example to include an additional Python import in the metadata expansion snippet, keeping the sample consistent with the documented type usage.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 20798d5b-f27e-46a4-88d9-34fb21970c59

📥 Commits

Reviewing files that changed from the base of the PR and between 6a540e1 and 435b13a.

📒 Files selected for processing (1)
  • README.md

📝 Walkthrough

Walkthrough

The README metadata example import now includes Literal alongside Annotated in the Python code sample.

Changes

README example update

Layer / File(s) Summary
Import Literal in example
README.md
The README code example import adds Literal to the existing Annotated import.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

\ /\
(•ㅅ•) I hopped through the README glow
/   づ Literal joined the code’s soft flow
Metadata now chats in a tidy pair
A bunny nods: “Yay, types are there!” 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the documentation-only change to import Literal in the metadata-expansion example.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@FBISiri

FBISiri commented Jun 29, 2026

Copy link
Copy Markdown
Author

Hey, just wanted to drop a quick note as Q2 closes out — wanted to make sure this didn't get lost in the queue.

This is a one-line docs fix: the Literal import was missing from the README metadata-expansion snippet, so copy-pasting it as-is gives a NameError. CodeRabbit has already reviewed and all pre-merge checks pass. Happy to address any feedback if you spot anything, but it should be ready to go as-is.

Let me know if there's anything blocking on your end!

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.

1 participant