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

fix typespecs for find_or_create #29

Conversation

CorneliaKelinske
Copy link
Contributor

This fixes those two dialyzer complaints:

lib/actions.ex:191:invalid_contract
The @spec for the function does not match the success typing of the function.

Function:
EctoShorts.Actions.find_or_create/3

Success typing:
@spec find_or_create(Ecto.Query | Ecto.Schema, map(), Keyword.t()) :: {:error, _} | {:ok, %{atom() => _}}

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
lib/actions.ex:192:invalid_contract
The @spec for the function does not match the success typing of the function.

Function:
EctoShorts.Actions.find_or_create/2

Success typing:
@spec find_or_create(Ecto.Query | Ecto.Schema, map()) :: {:error, _} | {:ok, %{atom() => _}}

@MikaAK MikaAK merged commit 8401143 into MikaAK:main Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants