Skip to content

Commit

Permalink
Fix list of maps bug (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgullion-vonage authored Aug 23, 2023
1 parent 5ffca51 commit 46e70d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/nimble_options/docs.ex
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ defmodule NimbleOptions.Docs do
defp get_raw_type_str(:string), do: "`t:String.t/0`"
defp get_raw_type_str(:keyword_list), do: "`t:keyword/0`"
defp get_raw_type_str(:non_empty_keyword_list), do: "non-empty `t:keyword/0`"
defp get_raw_type_str({:map, _keys}), do: "`t:map/0`"
defp get_raw_type_str({:keyword_list, _keys}), do: "`t:keyword/0`"
defp get_raw_type_str({:non_empty_keyword_list, _keys}), do: "non-empty `t:keyword/0`"
defp get_raw_type_str(:map), do: "`t:map/0`"
Expand Down
3 changes: 3 additions & 0 deletions test/nimble_options/docs_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ defmodule NimbleOptions.DocsTest do
list_of_ints: [type: {:list, :integer}],
nested_list_of_ints: [type: {:list, {:list, :integer}}],
list_of_kws: [type: {:list, {:keyword_list, []}}],
list_of_maps: [type: {:list, {:map, []}}],
map: [type: :map],
map_of_strings: [type: {:map, :string, :string}],
tuple: [type: {:tuple, [:integer, :atom, {:list, :string}]}],
Expand Down Expand Up @@ -332,6 +333,8 @@ defmodule NimbleOptions.DocsTest do
* `:list_of_kws` (list of `t:keyword/0`)
* `:list_of_maps` (list of `t:map/0`)
* `:map` (`t:map/0`)
* `:map_of_strings` (map of `t:String.t/0` keys and `t:String.t/0` values)
Expand Down

0 comments on commit 46e70d7

Please sign in to comment.