Browse Source

Autofix Rubocop Lint/UnusedBlockArgument (#23712)

closed-social-glitch-2
Nick Schonning 1 year ago
committed by GitHub
parent
commit
dbc6d7b276
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 11 deletions
  1. +0
    -8
      .rubocop_todo.yml
  2. +2
    -2
      spec/lib/activitypub/activity/add_spec.rb
  3. +1
    -1
      spec/lib/request_pool_spec.rb

+ 0
- 8
.rubocop_todo.yml View File

@ -278,14 +278,6 @@ Lint/OrAssignmentToConstant:
Exclude:
- 'lib/sanitize_ext/sanitize_config.rb'
# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
Lint/UnusedBlockArgument:
Exclude:
- 'spec/lib/activitypub/activity/add_spec.rb'
- 'spec/lib/request_pool_spec.rb'
# Offense count: 33
Lint/UselessAssignment:
Exclude:

+ 2
- 2
spec/lib/activitypub/activity/add_spec.rb View File

@ -48,7 +48,7 @@ RSpec.describe ActivityPub::Activity::Add do
end
it 'fetches the status and pins it' do
allow(service_stub).to receive(:call) do |uri, id: true, on_behalf_of: nil, request_id: nil|
allow(service_stub).to receive(:call) do |uri, id: true, on_behalf_of: nil, request_id: nil| # rubocop:disable Lint/UnusedBlockArgument
expect(uri).to eq 'https://example.com/unknown'
expect(id).to eq true
expect(on_behalf_of&.following?(sender)).to eq true
@ -62,7 +62,7 @@ RSpec.describe ActivityPub::Activity::Add do
context 'when there is no local follower' do
it 'tries to fetch the status' do
allow(service_stub).to receive(:call) do |uri, id: true, on_behalf_of: nil, request_id: nil|
allow(service_stub).to receive(:call) do |uri, id: true, on_behalf_of: nil, request_id: nil| # rubocop:disable Lint/UnusedBlockArgument
expect(uri).to eq 'https://example.com/unknown'
expect(id).to eq true
expect(on_behalf_of).to eq nil

+ 1
- 1
spec/lib/request_pool_spec.rb View File

@ -33,7 +33,7 @@ describe RequestPool do
subject
threads = 20.times.map do |i|
threads = 20.times.map do |_i|
Thread.new do
20.times do
subject.with('http://example.com') do |http_client|

Loading…
Cancel
Save