lint: fix warnings throughout codebase

This commit is contained in:
Phantasm 2026-03-31 16:04:55 +02:00
commit c8baad165b
No known key found for this signature in database
GPG key ID: 2669E588BCC634C8
6 changed files with 27 additions and 9 deletions

View file

View file

@ -172,7 +172,10 @@ defmodule Pleroma.Web.ApiSpec.ListOperation do
type: :object, type: :object,
properties: %{ properties: %{
title: %Schema{type: :string, description: "List title"}, title: %Schema{type: :string, description: "List title"},
exclusive: %Schema{type: :boolean, description: "Whether members of the list should be removed from the “Home” feed"} exclusive: %Schema{
type: :boolean,
description: "Whether members of the list should be removed from the “Home” feed"
}
}, },
required: [:title] required: [:title]
}, },
@ -188,7 +191,10 @@ defmodule Pleroma.Web.ApiSpec.ListOperation do
type: :object, type: :object,
properties: %{ properties: %{
title: %Schema{type: :string, description: "List title"}, title: %Schema{type: :string, description: "List title"},
exclusive: %Schema{type: :boolean, description: "Whether members of the list should be removed from the “Home” feed"} exclusive: %Schema{
type: :boolean,
description: "Whether members of the list should be removed from the “Home” feed"
}
} }
}, },
required: true required: true

View file

@ -48,7 +48,8 @@ defmodule Pleroma.Web.Endpoint do
@static_cache_control "public, max-age=1209600, immutable" @static_cache_control "public, max-age=1209600, immutable"
@static_cache_disabled "public, no-cache" @static_cache_disabled "public, no-cache"
@favicon_cache_control "public, max=age=86400, immutable" # cache for a day # cache for a day
@favicon_cache_control "public, max=age=86400, immutable"
# InstanceStatic needs to be before Plug.Static to be able to override shipped-static files # InstanceStatic needs to be before Plug.Static to be able to override shipped-static files
# If you're adding new paths to `only:` you'll need to configure them in InstanceStatic as well # If you're adding new paths to `only:` you'll need to configure them in InstanceStatic as well

View file

@ -10,7 +10,7 @@ defmodule Pleroma.Web.ActivityPub.MRFTest do
alias Pleroma.Web.ActivityPub.MRF alias Pleroma.Web.ActivityPub.MRF
defp regexes_match!([],[]), do: true defp regexes_match!([], []), do: true
defp regexes_match!([authority | authority_rest], [checked | checked_rest]) do defp regexes_match!([authority | authority_rest], [checked | checked_rest]) do
authority.source == checked.source and regexes_match!(authority_rest, checked_rest) authority.source == checked.source and regexes_match!(authority_rest, checked_rest)

View file

@ -1815,7 +1815,10 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
test "returns lists to which the account belongs" do test "returns lists to which the account belongs" do
%{user: user, conn: conn} = oauth_access(["read:lists"]) %{user: user, conn: conn} = oauth_access(["read:lists"])
other_user = insert(:user) other_user = insert(:user)
assert {:ok, %Pleroma.List{id: _list_id} = list} = Pleroma.List.create(%{title: "Test List"}, user)
assert {:ok, %Pleroma.List{id: _list_id} = list} =
Pleroma.List.create(%{title: "Test List"}, user)
{:ok, %{following: _following}} = Pleroma.List.follow(list, other_user) {:ok, %{following: _following}} = Pleroma.List.follow(list, other_user)
assert [%{"id" => _list_id, "title" => "Test List"}] = assert [%{"id" => _list_id, "title" => "Test List"}] =

View file

@ -83,7 +83,9 @@ defmodule Pleroma.Web.RemoteInteraction.RemoteInteractionControllerTest do
response = response =
conn conn
|> get(remote_interaction_path(conn, :follow, %{acct: "https://mastodon.social/users/emelie"})) |> get(
remote_interaction_path(conn, :follow, %{acct: "https://mastodon.social/users/emelie"})
)
|> html_response(200) |> html_response(200)
assert response =~ "Log in to follow" assert response =~ "Log in to follow"
@ -114,7 +116,9 @@ defmodule Pleroma.Web.RemoteInteraction.RemoteInteractionControllerTest do
response = response =
conn conn
|> assign(:user, user) |> assign(:user, user)
|> get(remote_interaction_path(conn, :follow, %{acct: "https://mastodon.social/users/emelie"})) |> get(
remote_interaction_path(conn, :follow, %{acct: "https://mastodon.social/users/emelie"})
)
|> html_response(200) |> html_response(200)
assert response =~ "Remote follow" assert response =~ "Remote follow"
@ -157,7 +161,9 @@ defmodule Pleroma.Web.RemoteInteraction.RemoteInteractionControllerTest do
conn conn
|> assign(:user, user) |> assign(:user, user)
|> assign(:token, read_token) |> assign(:token, read_token)
|> post(remote_interaction_path(conn, :do_follow), %{"user" => %{"id" => user2.id}}) |> post(remote_interaction_path(conn, :do_follow), %{
"user" => %{"id" => user2.id}
})
|> response(200) |> response(200)
assert response =~ "Error following account" assert response =~ "Error following account"
@ -496,7 +502,9 @@ defmodule Pleroma.Web.RemoteInteraction.RemoteInteractionControllerTest do
) )
assert redirected_to(conn) == assert redirected_to(conn) ==
remote_interaction_path(conn, :follow, %{acct: "https://mastodon.social/users/emelie"}) remote_interaction_path(conn, :follow, %{
acct: "https://mastodon.social/users/emelie"
})
end end
end end