summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLain Soykaf <lain@lain.com>2025-03-11 18:21:27 +0400
committerLain Soykaf <lain@lain.com>2025-03-11 18:21:27 +0400
commit5ce612b2723381a978f3810a414a3c3038a1859c (patch)
tree9ee7bf53ef26d1fc2f39922808b8beb24c18414f
parent4c8a8a4b62151ab86019cf92ffb67dc81e13cdd7 (diff)
downloadpleroma-5ce612b2723381a978f3810a414a3c3038a1859c.tar.gz
pleroma-5ce612b2723381a978f3810a414a3c3038a1859c.zip
Linting
-rw-r--r--lib/pleroma/date_time.ex (renamed from lib/pleroma/datetime.ex)0
-rw-r--r--lib/pleroma/date_time/impl.ex (renamed from lib/pleroma/datetime/impl.ex)0
-rw-r--r--lib/pleroma/mogrify_behaviour.ex15
-rw-r--r--lib/pleroma/mogrify_wrapper.ex (renamed from lib/pleroma/mogrify.ex)12
-rw-r--r--test/pleroma/upload/filter/anonymize_filename_test.exs2
-rw-r--r--test/pleroma/upload/filter/mogrifun_test.exs2
-rw-r--r--test/pleroma/upload/filter/mogrify_test.exs4
-rw-r--r--test/pleroma/upload/filter_test.exs2
-rw-r--r--test/pleroma/web/plugs/instance_static_test.exs2
9 files changed, 21 insertions, 18 deletions
diff --git a/lib/pleroma/datetime.ex b/lib/pleroma/date_time.ex
index d79cb848b..d79cb848b 100644
--- a/lib/pleroma/datetime.ex
+++ b/lib/pleroma/date_time.ex
diff --git a/lib/pleroma/datetime/impl.ex b/lib/pleroma/date_time/impl.ex
index 102be047b..102be047b 100644
--- a/lib/pleroma/datetime/impl.ex
+++ b/lib/pleroma/date_time/impl.ex
diff --git a/lib/pleroma/mogrify_behaviour.ex b/lib/pleroma/mogrify_behaviour.ex
new file mode 100644
index 000000000..234cb86cf
--- /dev/null
+++ b/lib/pleroma/mogrify_behaviour.ex
@@ -0,0 +1,15 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.MogrifyBehaviour do
+ @moduledoc """
+ Behaviour for Mogrify operations.
+ This module defines the interface for Mogrify operations that can be mocked in tests.
+ """
+
+ @callback open(binary()) :: map()
+ @callback custom(map(), binary()) :: map()
+ @callback custom(map(), binary(), binary()) :: map()
+ @callback save(map(), keyword()) :: map()
+end
diff --git a/lib/pleroma/mogrify.ex b/lib/pleroma/mogrify_wrapper.ex
index 77725e8f2..17174fd97 100644
--- a/lib/pleroma/mogrify.ex
+++ b/lib/pleroma/mogrify_wrapper.ex
@@ -2,18 +2,6 @@
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
-defmodule Pleroma.MogrifyBehaviour do
- @moduledoc """
- Behaviour for Mogrify operations.
- This module defines the interface for Mogrify operations that can be mocked in tests.
- """
-
- @callback open(binary()) :: map()
- @callback custom(map(), binary()) :: map()
- @callback custom(map(), binary(), binary()) :: map()
- @callback save(map(), keyword()) :: map()
-end
-
defmodule Pleroma.MogrifyWrapper do
@moduledoc """
Default implementation of MogrifyBehaviour that delegates to Mogrify.
diff --git a/test/pleroma/upload/filter/anonymize_filename_test.exs b/test/pleroma/upload/filter/anonymize_filename_test.exs
index 0f817a5a1..5dae62003 100644
--- a/test/pleroma/upload/filter/anonymize_filename_test.exs
+++ b/test/pleroma/upload/filter/anonymize_filename_test.exs
@@ -6,8 +6,8 @@ defmodule Pleroma.Upload.Filter.AnonymizeFilenameTest do
use Pleroma.DataCase, async: true
import Mox
- alias Pleroma.Upload
alias Pleroma.StaticStubbedConfigMock, as: ConfigMock
+ alias Pleroma.Upload
setup do
File.cp!("test/fixtures/image.jpg", "test/fixtures/image_tmp.jpg")
diff --git a/test/pleroma/upload/filter/mogrifun_test.exs b/test/pleroma/upload/filter/mogrifun_test.exs
index 4de998c88..77a9c1666 100644
--- a/test/pleroma/upload/filter/mogrifun_test.exs
+++ b/test/pleroma/upload/filter/mogrifun_test.exs
@@ -6,9 +6,9 @@ defmodule Pleroma.Upload.Filter.MogrifunTest do
use Pleroma.DataCase, async: true
import Mox
+ alias Pleroma.MogrifyMock
alias Pleroma.Upload
alias Pleroma.Upload.Filter
- alias Pleroma.MogrifyMock
test "apply mogrify filter" do
File.cp!(
diff --git a/test/pleroma/upload/filter/mogrify_test.exs b/test/pleroma/upload/filter/mogrify_test.exs
index 6826faafe..f8ed6e8dd 100644
--- a/test/pleroma/upload/filter/mogrify_test.exs
+++ b/test/pleroma/upload/filter/mogrify_test.exs
@@ -6,9 +6,9 @@ defmodule Pleroma.Upload.Filter.MogrifyTest do
use Pleroma.DataCase, async: true
import Mox
- alias Pleroma.Upload.Filter
- alias Pleroma.StaticStubbedConfigMock, as: ConfigMock
alias Pleroma.MogrifyMock
+ alias Pleroma.StaticStubbedConfigMock, as: ConfigMock
+ alias Pleroma.Upload.Filter
setup :verify_on_exit!
diff --git a/test/pleroma/upload/filter_test.exs b/test/pleroma/upload/filter_test.exs
index 79bc369a6..a369a723a 100644
--- a/test/pleroma/upload/filter_test.exs
+++ b/test/pleroma/upload/filter_test.exs
@@ -6,8 +6,8 @@ defmodule Pleroma.Upload.FilterTest do
use Pleroma.DataCase
import Mox
- alias Pleroma.Upload.Filter
alias Pleroma.StaticStubbedConfigMock, as: ConfigMock
+ alias Pleroma.Upload.Filter
test "applies filters" do
ConfigMock
diff --git a/test/pleroma/web/plugs/instance_static_test.exs b/test/pleroma/web/plugs/instance_static_test.exs
index e8cf17f3f..33b74dcf0 100644
--- a/test/pleroma/web/plugs/instance_static_test.exs
+++ b/test/pleroma/web/plugs/instance_static_test.exs
@@ -114,7 +114,7 @@ defmodule Pleroma.Web.Plugs.InstanceStaticTest do
_ -> nil
end)
- # It should have been sanitized to application/octet-stream because "application"
+ # It should have been sanitized to application/octet-stream because "application"
# is not in the allowed_mime_types list
assert content_type == "application/octet-stream"