DEV: Fix Lint/ShadowedArgument (#24733)

This commit is contained in:
Jarek Radosz 2023-12-06 13:16:10 +01:00 committed by GitHub
parent 1e471f7ec2
commit 4280c01153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 7 deletions

View File

@ -14,7 +14,7 @@ module Jobs
(@call_count % 24) == 1 (@call_count % 24) == 1
end end
def execute(args = nil) def execute(_ = nil)
# Feature topics in categories # Feature topics in categories
CategoryFeaturedTopic.feature_topics(batched: true) CategoryFeaturedTopic.feature_topics(batched: true)

View File

@ -12,10 +12,9 @@ module Compression
def compress(path, target_name) def compress(path, target_name)
current_target = target_name current_target = target_name
@strategies.reduce("") do |compressed_path, strategy| @strategies.reduce(nil) do |_, strategy|
compressed_path = strategy.compress(path, current_target) compressed_path = strategy.compress(path, current_target)
current_target = compressed_path.split("/").last current_target = compressed_path.split("/").last
compressed_path compressed_path
end end
end end

View File

@ -160,7 +160,7 @@ module Onebox
end end
def set_from_normalizer_data(normalizer) def set_from_normalizer_data(normalizer)
normalizer.data.each do |k, v| normalizer.data.each do |k, _|
v = normalizer.send(k) v = normalizer.send(k)
@raw[k] ||= v unless v.nil? @raw[k] ||= v unless v.nil?
end end

View File

@ -2,7 +2,7 @@
module Chat module Chat
module UserNotificationsExtension module UserNotificationsExtension
def chat_summary(user, opts) def chat_summary(user, _ = nil)
guardian = Guardian.new(user) guardian = Guardian.new(user)
return unless guardian.can_chat? return unless guardian.can_chat?

View File

@ -32,7 +32,7 @@ RSpec.describe User do
describe "default sidebar section links" do describe "default sidebar section links" do
fab!(:category) fab!(:category)
fab!(:secured_category) do |category| fab!(:secured_category) do
category = Fabricate(:category) category = Fabricate(:category)
category.permissions = { "staff" => :full } category.permissions = { "staff" => :full }
category.save! category.save!

View File

@ -300,7 +300,7 @@ RSpec.describe InvitesController do
context "when topic is private" do context "when topic is private" do
fab!(:group) fab!(:group)
fab!(:secured_category) do |category| fab!(:secured_category) do
category = Fabricate(:category) category = Fabricate(:category)
category.permissions = { group.name => :full } category.permissions = { group.name => :full }
category.save! category.save!