Revert "Only warn about bad clear_config usage if warned usage is met"

What was I even thinking when writing that?

This reverts commit 3790e6786c.
This commit is contained in:
Phantasm 2026-07-19 22:15:37 +02:00
commit bbae94ddf3
No known key found for this signature in database
GPG key ID: 2669E588BCC634C8

View file

@ -73,8 +73,7 @@ defmodule Pleroma.Tests.Helpers do
defmacro clear_config(config_path, temp_setting) do defmacro clear_config(config_path, temp_setting) do
# NOTE: `clear_config([section, key], value)` != `clear_config([section], key: value)` (!) # NOTE: `clear_config([section, key], value)` != `clear_config([section], key: value)` (!)
# Displaying a warning to prevent unintentional clearing of all but one keys in section # Displaying a warning to prevent unintentional clearing of all but one keys in section
if is_list(config_path) and length(config_path) == 1 and Keyword.keyword?(temp_setting) and if Keyword.keyword?(temp_setting) and length(temp_setting) == 1 do
Keyword.keys(temp_setting) == [:key] do
Logger.warning( Logger.warning(
"Please change `clear_config([section], key: value)` to `clear_config([section, key], value)`" "Please change `clear_config([section], key: value)` to `clear_config([section, key], value)`"
) )