Skip to content

Commit

Permalink
Add "@doc since" to a bunch of functions
Browse files Browse the repository at this point in the history
  • Loading branch information
whatyouhide committed Jul 9, 2023
1 parent bc35fac commit 632daad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions lib/stream_data.ex
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ defmodule StreamData do
By nature, this generator is not shrinkable.
"""
@doc since: "0.6.0"
@spec repeatedly((-> returns)) :: t(returns) when returns: term()
def repeatedly(fun) when is_function(fun, 0) do
new(fn _seed, _size ->
Expand Down Expand Up @@ -1324,7 +1325,7 @@ defmodule StreamData do
generated by the generator unders those keys.
By default, all keys are considered optional. A list of exactly which keys are optional can be
provided as the second argument, allowing for a map of mixed optional and required keys.
provided as the second argument, allowing for a map of mixed optional and required keys. The second argument is available since StreamData 0.6.0.
See also `fixed_map/1`.
Expand Down Expand Up @@ -1636,6 +1637,7 @@ defmodule StreamData do
Generated values shrink towards `0`.
"""
@doc since: "0.6.0"
@spec non_negative_integer() :: t(non_neg_integer())
def non_negative_integer() do
new(fn seed, size ->
Expand Down Expand Up @@ -1867,6 +1869,7 @@ defmodule StreamData do
#=> ~c"Kk:"
"""
@doc since: "0.6.0"
@spec codepoint(:ascii | :alphanumeric | :printable | :utf8) :: t(char())
def codepoint(kind \\ :utf8)

Expand Down Expand Up @@ -1903,7 +1906,8 @@ defmodule StreamData do
are generated. Such strings shrink towards lower codepoints.
* `:utf8` - valid strings (`String.valid?/1` returns `true`)
are generated. Such strings shrink towards lower codepoints.
are generated. Such strings shrink towards lower codepoints. *Available
since 0.6.0.*
* a range - strings with characters from the range are generated. Such
strings shrink towards characters that appear earlier in the range.
Expand Down Expand Up @@ -2099,6 +2103,7 @@ defmodule StreamData do
Shrinks towards less nested chardata and ultimately towards smaller binaries.
"""
@doc since: "0.6.0"
@spec chardata() :: t(IO.chardata())
def chardata() do
frequency([
Expand Down
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
%{
"certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"},
"dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"},
"earmark_parser": {:hex, :earmark_parser, "1.4.32", "fa739a0ecfa34493de19426681b23f6814573faee95dfd4b4aafe15a7b5b32c6", [:mix], [], "hexpm", "b8b0dd77d60373e77a3d7e8afa598f325e49e8663a51bcc2b88ef41838cca755"},
"earmark_parser": {:hex, :earmark_parser, "1.4.33", "3c3fd9673bb5dcc9edc28dd90f50c87ce506d1f71b70e3de69aa8154bc695d44", [:mix], [], "hexpm", "2d526833729b59b9fdb85785078697c72ac5e5066350663e5be6a1182da61b8f"},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"ex_doc": {:hex, :ex_doc, "0.29.4", "6257ecbb20c7396b1fe5accd55b7b0d23f44b6aa18017b415cb4c2b91d997729", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "2c6699a737ae46cb61e4ed012af931b57b699643b24dabe2400a8168414bc4f5"},
"ex_doc": {:hex, :ex_doc, "0.30.1", "a0f3b598d3c2cb3af48af39e59fa66ac8d4033740409b11dd753a3f30f8f8f7a", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "2e2216e84aa33e5803f8898d762b0f5e76bf2de3a08d1f40ac5f74456dd5057c"},
"excoveralls": {:hex, :excoveralls, "0.16.0", "41f4cfbf7caaa3bc2cf411db6f89c1f53afedf0f1fe8debac918be1afa19c668", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "401205356482ab99fb44d9812cd14dd83b65de8e7ae454697f8b34ba02ecd916"},
"hackney": {:hex, :hackney, "1.18.1", "f48bf88f521f2a229fc7bae88cf4f85adc9cd9bcf23b5dc8eb6a1788c662c4f6", [:rebar3], [{:certifi, "~> 2.9.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a4ecdaff44297e9b5894ae499e9a070ea1888c84afdd1fd9b7b2bc384950128e"},
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
Expand Down

0 comments on commit 632daad

Please sign in to comment.