Formatting

This commit is contained in:
timorl 2024-04-16 08:02:13 +02:00
parent b144218dce
commit 59d32c10d9
No known key found for this signature in database
GPG key ID: 8E97CB9C0E7F3285
5 changed files with 53 additions and 56 deletions

View file

@ -34,9 +34,7 @@ defmodule Pleroma.Web.Plugs.OAuthScopesPlug do
permissions = Enum.join(missing_scopes, " #{op} ") permissions = Enum.join(missing_scopes, " #{op} ")
error_message = error_message =
dgettext("errors", "Insufficient permissions: %{permissions}.", dgettext("errors", "Insufficient permissions: %{permissions}.", permissions: permissions)
permissions: permissions
)
conn conn
|> put_resp_content_type("application/json") |> put_resp_content_type("application/json")

View file

@ -151,8 +151,7 @@ defmodule Pleroma.Web.Telemetry do
# phoenix.router_dispatch.stop.duration # phoenix.router_dispatch.stop.duration
# pleroma.repo.query.total_time # pleroma.repo.query.total_time
# pleroma.repo.query.queue_time # pleroma.repo.query.queue_time
dist_metrics = dist_metrics = [
[
distribution("phoenix.endpoint.stop.duration.fdist", distribution("phoenix.endpoint.stop.duration.fdist",
event_name: [:phoenix, :endpoint, :stop], event_name: [:phoenix, :endpoint, :stop],
measurement: :duration, measurement: :duration,

View file

@ -93,8 +93,10 @@ defmodule Mix.Tasks.Pleroma.InstanceTest do
assert generated_config =~ "password: \"dbpass\"" assert generated_config =~ "password: \"dbpass\""
assert generated_config =~ "configurable_from_database: true" assert generated_config =~ "configurable_from_database: true"
assert generated_config =~ "http: [ip: {127, 0, 0, 1}, port: 4000]" assert generated_config =~ "http: [ip: {127, 0, 0, 1}, port: 4000]"
assert generated_config =~ assert generated_config =~
"filters: [Pleroma.Upload.Filter.Exiftool.StripLocation, Pleroma.Upload.Filter.Exiftool.ReadDescription]" "filters: [Pleroma.Upload.Filter.Exiftool.StripLocation, Pleroma.Upload.Filter.Exiftool.ReadDescription]"
assert generated_config =~ "base_url: \"https://media.pleroma.social/media\"" assert generated_config =~ "base_url: \"https://media.pleroma.social/media\""
assert File.read!(tmp_path() <> "setup.psql") == generated_setup_psql() assert File.read!(tmp_path() <> "setup.psql") == generated_setup_psql()
assert File.exists?(Path.expand("./test/instance/static/robots.txt")) assert File.exists?(Path.expand("./test/instance/static/robots.txt"))

View file

@ -12,8 +12,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidatorTest do
describe "attachments" do describe "attachments" do
test "works with apng" do test "works with apng" do
attachment = attachment = %{
%{
"mediaType" => "image/apng", "mediaType" => "image/apng",
"name" => "", "name" => "",
"type" => "Document", "type" => "Document",

View file

@ -559,8 +559,7 @@ defmodule Pleroma.Factory do
like_activity = attrs[:like_activity] || insert(:like_activity) like_activity = attrs[:like_activity] || insert(:like_activity)
attrs = Map.drop(attrs, [:like_activity]) attrs = Map.drop(attrs, [:like_activity])
data = data = %{
%{
"id" => Pleroma.Web.ActivityPub.Utils.generate_activity_id(), "id" => Pleroma.Web.ActivityPub.Utils.generate_activity_id(),
"type" => "Undo", "type" => "Undo",
"actor" => like_activity.data["actor"], "actor" => like_activity.data["actor"],