Skip to content

Commit

Permalink
Fix various typos and improve language (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
preciz authored Aug 4, 2024
1 parent 067dcf8 commit f6848b1
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions lib/kino.ex
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ defmodule Kino do
The callback receives a stream element and the accumulated state
and it should return either of:
* `{:cont, term_to_render, state}` - the continue
* `{:cont, term_to_render, state}` - to continue
* `:halt` - to no longer schedule callback evaluation
Expand Down Expand Up @@ -276,7 +276,7 @@ defmodule Kino do
The callback should return either of:
* `{:cont, state}` - the continue
* `{:cont, state}` - to continue
* `:halt` - to stop listening
Expand Down Expand Up @@ -536,16 +536,16 @@ defmodule Kino do
end

@doc """
Recompiles dependenies.
Recompiles dependencies.
Once you have installed dependencies with `Mix.install/1`, this will
recompile any outdated path dependencies declared during the install.
> #### Reproducability {: .warning}
> #### Reproducibility {: .warning}
>
> Keep in mind that recompiling dependency modules is **not** going
> to mark any cells as stale. This means that the given notebook
> state may no longer be reproducable. This function is meant as a
> state may no longer be reproducible. This function is meant as a
> utility when prototyping alongside a Mix project.
"""
@spec recompile() :: :ok
Expand Down
2 changes: 1 addition & 1 deletion lib/kino/audio.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule Kino.Audio do
@doc """
Creates a new kino displaying the given binary audio.
The given type be either `:wav`, `:mp3`/`:mpeg`, `:ogg`
The given type can be either `:wav`, `:mp3`/`:mpeg`, `:ogg`
or a string with audio MIME type.
## Options
Expand Down
4 changes: 2 additions & 2 deletions lib/kino/bridge.ex
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ defmodule Kino.Bridge do
end

@doc """
Requests the file path for notebook file with the given name.
Requests the file path for the notebook file with the given name.
"""
@spec get_file_entry_path(String.t()) ::
{:ok, term()} | {:error, :forbidden} | {:error, String.t()} | request_error()
Expand All @@ -95,7 +95,7 @@ defmodule Kino.Bridge do
end

@doc """
Requests the file spec for notebook file with the given name.
Requests the file spec for the notebook file with the given name.
"""
@spec get_file_entry_spec(String.t()) ::
{:ok, term()} | {:error, :forbidden} | {:error, String.t()} | request_error()
Expand Down
2 changes: 1 addition & 1 deletion lib/kino/image.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defmodule Kino.Image do
@doc """
Creates a new kino displaying the given binary image.
The given type be either `:jpeg`/`:jpg`, `:png`, `:gif`, `:svg`, `:pixel`
The given type can be either `:jpeg`/`:jpg`, `:png`, `:gif`, `:svg`, `:pixel`
or a string with image MIME type.
## Pixel data
Expand Down
4 changes: 2 additions & 2 deletions lib/kino/input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ defmodule Kino.Input do
@doc """
Creates a new number input.
The input value is can be either a number or `nil`.
The input value can be either a number or `nil`.
## Options
Expand Down Expand Up @@ -519,7 +519,7 @@ defmodule Kino.Input do
> #### Warning {: .warning}
>
> The image input is shared by default: once you upload a image,
> The image input is shared by default: once you upload an image,
> the image will be replicated to all users reading the notebook.
> Use `Kino.Control.form/2` if you want each user to have a distinct
> image upload with an explicit submission button.
Expand Down
2 changes: 1 addition & 1 deletion lib/kino/render.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ defprotocol Kino.Render do
def to_livebook(graph) do
source = Graph.to_mermaid(graph)
mermaid_kino = Kino.Mermaid.new(source)
inspect_kino = Kino.Inspect.new(image)
inspect_kino = Kino.Inspect.new(graph)
kino = Kino.Layout.tabs(Graph: mermaid_kino, Raw: inspect_kino)
Kino.Render.to_livebook(kino)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/kino/shorts.ex
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ defmodule Kino.Shorts do
> #### Warning {: .warning}
>
> The image input is shared by default: once you upload a image,
> The image input is shared by default: once you upload an image,
> the image will be replicated to all users reading the notebook.
> Use `Kino.Control.form/2` if you want each user to have a distinct
> image upload with an explicit submission button.
Expand Down
4 changes: 2 additions & 2 deletions lib/kino/video.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ defmodule Kino.Video do
@doc """
Creates a new kino displaying the given binary video.
The given type be either `:mp4`, `:ogg`, `:avi`, `:wmv`, `:mov`
The given type can be either `:mp4`, `:ogg`, `:avi`, `:wmv`, `:mov`
or a string with video MIME type.
## Options
Expand Down Expand Up @@ -79,6 +79,6 @@ defmodule Kino.Video do

defp mime_type!(other) do
raise ArgumentError,
"expected video type to be either :mp4, :ogg, :avi, :wmv, :mov, or an video MIME type string, got: #{inspect(other)}"
"expected video type to be either :mp4, :ogg, :avi, :wmv, :mov, or a video MIME type string, got: #{inspect(other)}"
end
end
2 changes: 1 addition & 1 deletion test/kino/attribute_store_test.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Kino.AttributeStoreTets do
defmodule Kino.AttributeStoreTest do
use ExUnit.Case, async: true

alias Kino.AttributeStore
Expand Down
2 changes: 1 addition & 1 deletion test/kino/process_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ defmodule Kino.ProcessTest do
end

describe "seq_trace/2" do
# Process.set_label/1 was addeed in Elixir 1.17.0
# Process.set_label/1 was added in Elixir 1.17.0
if function_exported?(Process, :set_label, 1) do
test "uses process label to identify a process" do
process_label = "ponger"
Expand Down
4 changes: 2 additions & 2 deletions test/kino/video_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ defmodule Kino.VideoTest do
describe "new/2" do
test "raises an error for a non-image MIME type" do
assert_raise ArgumentError,
~s{expected video type to be either :mp4, :ogg, :avi, :wmv, :mov, or an video MIME type string, got: "application/json"},
~s{expected video type to be either :mp4, :ogg, :avi, :wmv, :mov, or a video MIME type string, got: "application/json"},
fn ->
Kino.Video.new(<<>>, "application/json")
end
end

test "raises an error for an invalid type shorthand" do
assert_raise ArgumentError,
"expected video type to be either :mp4, :ogg, :avi, :wmv, :mov, or an video MIME type string, got: :invalid",
"expected video type to be either :mp4, :ogg, :avi, :wmv, :mov, or a video MIME type string, got: :invalid",
fn ->
Kino.Video.new(<<>>, :invalid)
end
Expand Down

0 comments on commit f6848b1

Please sign in to comment.