From b5b187ad8865ee78668a112012e594d6e0ebc20c Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Sun, 11 Jan 2026 22:36:58 +0100 Subject: [PATCH] Fix `Style/PercentLiteralDelimiters` type of Ameba issues --- src/invidious/helpers/handlers.cr | 8 ++++---- src/invidious/helpers/logger.cr | 2 +- src/invidious/helpers/tokens.cr | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/invidious/helpers/handlers.cr b/src/invidious/helpers/handlers.cr index ca0556568..2d349993c 100644 --- a/src/invidious/helpers/handlers.cr +++ b/src/invidious/helpers/handlers.cr @@ -20,7 +20,7 @@ module HTTP::Handler end class Kemal::RouteHandler - {% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %} + {% for method in %w[GET POST PUT HEAD DELETE PATCH OPTIONS] %} exclude ["/api/v1/*"], {{ method }} {% end %} @@ -44,7 +44,7 @@ class Kemal::RouteHandler end class Kemal::ExceptionHandler - {% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %} + {% for method in %w[GET POST PUT HEAD DELETE PATCH OPTIONS] %} exclude ["/api/v1/*"], {{ method }} {% end %} @@ -72,7 +72,7 @@ class FilteredCompressHandler < HTTP::CompressHandler end class AuthHandler < Kemal::Handler - {% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %} + {% for method in %w[GET POST PUT HEAD DELETE PATCH OPTIONS] %} only ["/api/v1/auth/*"], {{ method }} {% end %} @@ -121,7 +121,7 @@ class AuthHandler < Kemal::Handler end class APIHandler < Kemal::Handler - {% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %} + {% for method in %w[GET POST PUT HEAD DELETE PATCH OPTIONS] %} only ["/api/v1/*"], {{ method }} {% end %} exclude ["/api/v1/auth/notifications"], "GET" diff --git a/src/invidious/helpers/logger.cr b/src/invidious/helpers/logger.cr index bce10bb3e..5b06612ea 100644 --- a/src/invidious/helpers/logger.cr +++ b/src/invidious/helpers/logger.cr @@ -55,7 +55,7 @@ class Invidious::LogHandler < Kemal::BaseLogHandler end end - {% for level in %w(trace debug info warn error fatal) %} + {% for level in %w[trace debug info warn error fatal] %} def {{ level.id }}(message : String) if LogLevel::{{ level.id.capitalize }} >= @level puts("#{Time.utc} [{{ level.id }}] #{message}".colorize(color(LogLevel::{{ level.id.capitalize }}))) diff --git a/src/invidious/helpers/tokens.cr b/src/invidious/helpers/tokens.cr index a44988cd3..926863323 100644 --- a/src/invidious/helpers/tokens.cr +++ b/src/invidious/helpers/tokens.cr @@ -116,7 +116,7 @@ def scope_includes_scope(scope, subset) subset_endpoint = subset_endpoint.downcase if methods.empty? - methods = %w(GET POST PUT HEAD DELETE PATCH OPTIONS) + methods = %w[GET POST PUT HEAD DELETE PATCH OPTIONS] end if methods & subset_methods != subset_methods