From d3cccce9fd80d7359f7016cbe7e8796ba1fee3ab Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 27 Jun 2024 11:37:44 -0400 Subject: [PATCH] Elixir 1.17 warnings for parens Function calls must have parens --- lib/pleroma/search.ex | 2 +- lib/pleroma/web.ex | 2 +- lib/pleroma/web/activity_pub/mrf.ex | 2 +- lib/pleroma/web/api_spec/operations/streaming_operation.ex | 2 +- lib/pleroma/web/api_spec/schemas/chat.ex | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/pleroma/search.ex b/lib/pleroma/search.ex index fd0218cb8..b9d2a0188 100644 --- a/lib/pleroma/search.ex +++ b/lib/pleroma/search.ex @@ -16,6 +16,6 @@ defmodule Pleroma.Search do def healthcheck_endpoints do search_module = Pleroma.Config.get([Pleroma.Search, :module]) - search_module.healthcheck_endpoints + search_module.healthcheck_endpoints() end end diff --git a/lib/pleroma/web.ex b/lib/pleroma/web.ex index 7a8b176cd..e7e7e96f9 100644 --- a/lib/pleroma/web.ex +++ b/lib/pleroma/web.ex @@ -163,7 +163,7 @@ defmodule Pleroma.Web do """ def safe_render_many(collection, view, template, assigns \\ %{}) do Enum.map(collection, fn resource -> - as = Map.get(assigns, :as) || view.__resource__ + as = Map.get(assigns, :as) || view.__resource__() assigns = Map.put(assigns, as, resource) safe_render(view, template, assigns) end) diff --git a/lib/pleroma/web/activity_pub/mrf.ex b/lib/pleroma/web/activity_pub/mrf.ex index 1071f8e6e..bc418d908 100644 --- a/lib/pleroma/web/activity_pub/mrf.ex +++ b/lib/pleroma/web/activity_pub/mrf.ex @@ -204,7 +204,7 @@ defmodule Pleroma.Web.ActivityPub.MRF do if function_exported?(policy, :config_description, 0) do description = @default_description - |> Map.merge(policy.config_description) + |> Map.merge(policy.config_description()) |> Map.put(:group, :pleroma) |> Map.put(:tab, :mrf) |> Map.put(:type, :group) diff --git a/lib/pleroma/web/api_spec/operations/streaming_operation.ex b/lib/pleroma/web/api_spec/operations/streaming_operation.ex index b580bc2f0..47bce07b3 100644 --- a/lib/pleroma/web/api_spec/operations/streaming_operation.ex +++ b/lib/pleroma/web/api_spec/operations/streaming_operation.ex @@ -139,7 +139,7 @@ defmodule Pleroma.Web.ApiSpec.StreamingOperation do end defp get_schema(%Schema{} = schema), do: schema - defp get_schema(schema), do: schema.schema + defp get_schema(schema), do: schema.schema() defp server_sent_event_helper(name, description, type, payload, opts \\ []) do payload_type = Keyword.get(opts, :payload_type, :json) diff --git a/lib/pleroma/web/api_spec/schemas/chat.ex b/lib/pleroma/web/api_spec/schemas/chat.ex index a07d12865..affa25a95 100644 --- a/lib/pleroma/web/api_spec/schemas/chat.ex +++ b/lib/pleroma/web/api_spec/schemas/chat.ex @@ -68,7 +68,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Chat do }, "id" => "1", "unread" => 2, - "last_message" => ChatMessage.schema().example(), + "last_message" => ChatMessage.schema().example, "updated_at" => "2020-04-21T15:06:45.000Z" } })