mirror of
https://github.com/ash-project/ash_state_machine.git
synced 2024-09-19 12:53:20 +12:00
chore: format & credo
This commit is contained in:
parent
f17d117b28
commit
8bec910e5e
3 changed files with 4 additions and 4 deletions
|
@ -10,6 +10,5 @@ defmodule AshStateMachine.Errors.InvalidInitialState do
|
|||
"""
|
||||
Attempted to set initial state to `:#{error.target}` in action `:#{error.action}`, but it is not a valid initial state.
|
||||
"""
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -83,14 +83,14 @@ defmodule Mix.Tasks.AshStateMachine.GenerateFlowCharts do
|
|||
end
|
||||
end
|
||||
|
||||
defp is_state_machine?(module) do
|
||||
defp state_machine?(module) do
|
||||
Spark.Dsl.is?(module, Ash.Resource) and AshStateMachine in Spark.extensions(module)
|
||||
end
|
||||
|
||||
defp state_machines do
|
||||
for module <- modules(),
|
||||
{:module, module} = Code.ensure_compiled(module),
|
||||
is_state_machine?(module) do
|
||||
state_machine?(module) do
|
||||
module
|
||||
end
|
||||
end
|
||||
|
|
|
@ -66,7 +66,8 @@ defmodule AshStateMachineTest do
|
|||
|
||||
changes do
|
||||
# any failures should be captured and transitioned to the error state
|
||||
change after_transaction(fn changeset, {:ok, result}, _ ->
|
||||
change after_transaction(fn
|
||||
changeset, {:ok, result}, _ ->
|
||||
{:ok, result}
|
||||
|
||||
changeset, {:error, error}, _ ->
|
||||
|
|
Loading…
Reference in a new issue