Skip to content

Commit c59994d

Browse files
committed
Remove useful specs
1 parent 6eb5216 commit c59994d

File tree

5 files changed

+1
-21
lines changed

5 files changed

+1
-21
lines changed

lib/double_gis_monitor/application.ex

-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ defmodule DoubleGisMonitor.Application do
1515
This callback is responsible for starting its supervision tree.
1616
"""
1717
@impl true
18-
@callback start(term(), term()) ::
19-
{:ok, pid()} | {:ok, pid(), state :: term()} | {:error, reason :: term()}
2018
def start(_type, _args) do
2119
Logger.info("Application started, cwd is #{File.cwd!()}")
2220

@@ -27,7 +25,6 @@ defmodule DoubleGisMonitor.Application do
2725
This callback is called after its supervision tree has been stopped.
2826
"""
2927
@impl true
30-
@callback stop(term()) :: :ok
3128
def stop(_state) do
3229
Logger.info("Application stopped")
3330
end

lib/double_gis_monitor/event_poller.ex

-7
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ defmodule DoubleGisMonitor.EventPoller do
1111
@doc """
1212
Returns child specification for supervisor.
1313
"""
14-
@spec child_spec() :: %{
15-
:id => atom() | term(),
16-
:start => {module(), atom(), [term()]},
17-
:restart => :permanent | :transient | :temporary,
18-
:shutdown => timeout() | :brutal_kill,
19-
:type => :worker | :supervisor
20-
}
2114
def child_spec() do
2215
%{
2316
id: __MODULE__,

lib/double_gis_monitor/event_processor.ex

-8
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ defmodule DoubleGisMonitor.EventProcessor do
1111
@doc """
1212
Returns child specification for supervisor.
1313
"""
14-
@spec child_spec() :: %{
15-
:id => atom() | term(),
16-
:start => {module(), atom(), [term()]},
17-
:restart => :permanent | :transient | :temporary,
18-
:shutdown => timeout() | :brutal_kill,
19-
:type => :worker | :supervisor
20-
}
2114
def child_spec() do
2215
%{
2316
id: __MODULE__,
@@ -28,7 +21,6 @@ defmodule DoubleGisMonitor.EventProcessor do
2821
}
2922
end
3023

31-
@spec start_link([]) :: {:error, any()} | {:ok, pid()}
3224
def start_link([]) do
3325
Agent.start_link(__MODULE__, :init, [], name: __MODULE__)
3426
end

lib/double_gis_monitor/repo.ex

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ defmodule DoubleGisMonitor.Repo do
3333
{:ok, Enum.reduce(outdated_db_events, 0, reduce_fn)}
3434
end
3535

36-
@spec insert_new(any()) :: list()
3736
def insert_new(events) do
3837
filter_fn = fn e -> ensure_inserted?(e) end
3938
Enum.filter(events, filter_fn)

lib/double_gis_monitor/supervisor.ex

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ defmodule DoubleGisMonitor.Supervisor do
2525
## Callbacks
2626
#############
2727

28-
@impl true
29-
@callback init(init_arg :: term()) :: {:ok, tuple()}
3028
@doc """
3129
Callback invoked to start the supervision tree.
3230
"""
31+
@impl true
3332
def init([]) do
3433
Logger.info("Supervisor started")
3534

0 commit comments

Comments
 (0)