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
end
def execute(args = nil)
def execute(_ = nil)
# Feature topics in categories
CategoryFeaturedTopic.feature_topics(batched: true)

View File

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

View File

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

View File

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

View File

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

View File

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