Skip to content

Commit

Permalink
fix credo
Browse files Browse the repository at this point in the history
  • Loading branch information
mruoss committed Jun 13, 2024
1 parent 195a1e0 commit fe8bc9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ymlr/encode.ex
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ defmodule Ymlr.Encode do
end

defp string_encoding_type(data) do
if is_numeric(data) do
if numeric?(data) do
:single_quoted
else
do_string_encoding_type(data, nil)
Expand Down Expand Up @@ -431,7 +431,7 @@ defmodule Ymlr.Encode do

defp indent(level), do: ["\n" | List.duplicate(" ", level)]

defp is_numeric(string) do
defp numeric?(string) do
case Float.parse(string) do
{_, ""} -> true
_ -> false
Expand Down

0 comments on commit fe8bc9a

Please sign in to comment.