From 2d39268bc5ce1ead9e659f9260250a254f4abae4 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 7 Nov 2023 04:11:50 -0500 Subject: [PATCH] Fix `Lint/OrAssignmentToConstant` cop (#27750) --- .rubocop_todo.yml | 5 ----- lib/sanitize_ext/sanitize_config.rb | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 7cd42a8e6e8..2d191b9f3df 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -24,11 +24,6 @@ Lint/NonLocalExitFromIterator: Exclude: - 'app/helpers/jsonld_helper.rb' -# This cop supports unsafe autocorrection (--autocorrect-all). -Lint/OrAssignmentToConstant: - Exclude: - - 'lib/sanitize_ext/sanitize_config.rb' - # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. Lint/UnusedBlockArgument: diff --git a/lib/sanitize_ext/sanitize_config.rb b/lib/sanitize_ext/sanitize_config.rb index bdb4c56a085..70efe7c1ae5 100644 --- a/lib/sanitize_ext/sanitize_config.rb +++ b/lib/sanitize_ext/sanitize_config.rb @@ -64,7 +64,7 @@ class Sanitize current_node.wrap('

') end - MASTODON_STRICT ||= freeze_config( + MASTODON_STRICT = freeze_config( elements: %w(p br span a del pre blockquote code b strong u i em ul ol li), attributes: { @@ -91,7 +91,7 @@ class Sanitize ] ) - MASTODON_OEMBED ||= freeze_config( + MASTODON_OEMBED = freeze_config( elements: %w(audio embed iframe source video), attributes: {