Update rubocop
to version 1.75.0 (#34283)
This commit is contained in:
parent
e9fe01e2a6
commit
0e3ff680d3
6 changed files with 15 additions and 13 deletions
|
@ -260,7 +260,7 @@ class Request
|
|||
outer_e = nil
|
||||
port = args.first
|
||||
|
||||
addresses = [] # rubocop:disable Lint/UselessAssignment -- TODO: https://github.com/rubocop/rubocop/issues/13395
|
||||
addresses = []
|
||||
begin
|
||||
addresses = [IPAddr.new(host)]
|
||||
rescue IPAddr::InvalidAddressError
|
||||
|
|
|
@ -33,7 +33,8 @@ class Trends::Links < Trends::Base
|
|||
def register(status, at_time = Time.now.utc)
|
||||
original_status = status.proper
|
||||
|
||||
return unless (original_status.public_visibility? && status.public_visibility?) &&
|
||||
return unless original_status.public_visibility? &&
|
||||
status.public_visibility? &&
|
||||
!(original_status.account.silenced? || status.account.silenced?) &&
|
||||
!(original_status.spoiler_text? || original_status.sensitive?)
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ module Payloadable
|
|||
payload = ActiveModelSerializers::SerializableResource.new(record, options.merge(serializer: serializer, adapter: ActivityPub::Adapter)).as_json
|
||||
object = record.respond_to?(:virtual_object) ? record.virtual_object : record
|
||||
|
||||
if (object.respond_to?(:sign?) && object.sign?) && signer && (always_sign || signing_enabled?)
|
||||
if object.respond_to?(:sign?) && object.sign? && signer && (always_sign || signing_enabled?)
|
||||
ActivityPub::LinkedDataSignature.new(payload).sign!(signer, sign_with: sign_with)
|
||||
else
|
||||
payload
|
||||
|
|
|
@ -8,7 +8,7 @@ class PollExpirationNotifyWorker
|
|||
def perform(poll_id)
|
||||
@poll = Poll.find(poll_id)
|
||||
|
||||
return if does_not_expire?
|
||||
return if missing_expiration?
|
||||
requeue! && return if not_due_yet?
|
||||
|
||||
notify_remote_voters_and_owner! if @poll.local?
|
||||
|
@ -24,7 +24,7 @@ class PollExpirationNotifyWorker
|
|||
|
||||
private
|
||||
|
||||
def does_not_expire?
|
||||
def missing_expiration?
|
||||
@poll.expires_at.nil?
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue