Skip to content

Commit

Permalink
Merge pull request #391 from woylie/fix/type-specification
Browse files Browse the repository at this point in the history
fix/type specification
  • Loading branch information
woylie authored Jul 17, 2023
2 parents c36d081 + 405e127 commit 5b40ca8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
12 changes: 1 addition & 11 deletions .dialyzer_ignore.exs
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
[
~r/lib\/flop\/schema\.ex.*no_return Function default_limit\/1 has no local return\./,
~r/lib\/flop\/schema\.ex.*no_return Function default_order\/1 has no local return\./,
~r/lib\/flop\/schema\.ex.*no_return Function field_info\/2 has no local return\./,
~r/lib\/flop\/schema\.ex.*no_return Function field_type\/2 has no local return\./,
~r/lib\/flop\/schema\.ex.*no_return Function filterable\/1 has no local return\./,
~r/lib\/flop\/schema\.ex.*no_return Function max_limit\/1 has no local return\./,
~r/lib\/flop\/schema\.ex.*no_return Function pagination_types\/1 has no local return\./,
~r/lib\/flop\/schema\.ex.*no_return Function default_pagination_type\/1 has no local return\./,
~r/lib\/flop\/schema\.ex.*no_return Function sortable\/1 has no local return\./
]
[]
2 changes: 1 addition & 1 deletion lib/flop/adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ defmodule Flop.Adapter do
This callback will be removed as soon as a better solution is found or made
possible.
"""
@callback custom_func_builder(opts) :: any when opts: keyword
@callback custom_func_builder(opts) :: Macro.t() when opts: keyword
end
2 changes: 1 addition & 1 deletion lib/flop/schema.ex
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ defprotocol Flop.Schema do
def max_limit(data)

@doc false
@spec custom(any, any) :: Macro.t()
@spec custom(any, any) :: any
def custom(data, arg)
end

Expand Down
11 changes: 6 additions & 5 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ defmodule Flop.MixProject do
deps: deps(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
"coveralls.github": :test,
"coveralls.html": :test,
"coveralls.json": :test,
"coveralls.post": :test,
"ecto.create": :test,
"ecto.drop": :test,
"ecto.migrate": :test,
"ecto.reset": :test
"ecto.reset": :test,
coveralls: :test,
dialyzer: :test
],
dialyzer: [
ignore_warnings: ".dialyzer_ignore.exs",
Expand Down Expand Up @@ -55,7 +56,7 @@ defmodule Flop.MixProject do
defp deps do
[
{:credo, "~> 1.7.0", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.3.0", only: [:dev], runtime: false},
{:dialyxir, "~> 1.3.0", only: [:dev, :test], runtime: false},
{:ecto, "~> 3.9"},
{:ecto_sql, "~> 3.9", only: :test},
{:ex_doc, "~> 0.21", only: :dev, runtime: false},
Expand Down

0 comments on commit 5b40ca8

Please sign in to comment.