Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Kino.Render.Any.to_livebook/1 #491

Merged
merged 2 commits into from
Feb 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/kino/render.ex
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@

defimpl Kino.Render, for: Any do
def to_livebook(term) do
Kino.Output.inspect(term)
Kino.Output.to_livebook(term)

Check warning on line 49 in lib/kino/render.ex

View workflow job for this annotation

GitHub Actions / main (1.15.5, 26.0.2, true)

Kino.Output.to_livebook/1 is undefined or private
end
end

defimpl Kino.Render, for: Kino.Inspect do
def to_livebook(raw) do
Kino.Output.inspect(raw.term)
Kino.Render.Any.to_livebook(raw.term)
end
end

Expand Down Expand Up @@ -164,7 +164,7 @@
reference |> Kino.ETS.new() |> Kino.Render.to_livebook()

true ->
Kino.Output.inspect(reference)
Kino.Render.Any.to_livebook(reference)
end
end

Expand Down Expand Up @@ -198,7 +198,7 @@
Kino.Render.to_livebook(tabs)

true ->
Kino.Output.inspect(atom)
Kino.Render.Any.to_livebook(atom)
end
end

Expand All @@ -220,7 +220,7 @@
Kino.Render.to_livebook(tabs)

true ->
Kino.Output.inspect(pid)
Kino.Render.Any.to_livebook(pid)
end
end
end
Expand All @@ -229,7 +229,7 @@
def to_livebook(string) do
case Kino.Utils.get_image_type(string) do
nil ->
Kino.Output.inspect(string)
Kino.Render.Any.to_livebook(string)

type ->
raw = Kino.Inspect.new(string)
Expand Down
Loading