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

@ -10,7 +10,7 @@ defmodule Pleroma.Web.ActivityPub.MRFTest do
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
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
%{user: user, conn: conn} = oauth_access(["read:lists"])
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)
assert [%{"id" => _list_id, "title" => "Test List"}] =

View file

@ -83,7 +83,9 @@ defmodule Pleroma.Web.RemoteInteraction.RemoteInteractionControllerTest do
response =
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)
assert response =~ "Log in to follow"
@ -114,7 +116,9 @@ defmodule Pleroma.Web.RemoteInteraction.RemoteInteractionControllerTest do
response =
conn
|> 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)
assert response =~ "Remote follow"
@ -157,7 +161,9 @@ defmodule Pleroma.Web.RemoteInteraction.RemoteInteractionControllerTest do
conn
|> assign(:user, user)
|> 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)
assert response =~ "Error following account"
@ -496,7 +502,9 @@ defmodule Pleroma.Web.RemoteInteraction.RemoteInteractionControllerTest do
)
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