зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-09-03 17:55:52 +03:00
Update rubopcop (#227)
* Update rubopcop [WIP] * Further rubocop fixes * Fix rubocop-rails cops * Fix spec * Disable rubocop suggestions * Run rubocop in github actions rather than in codeclimate
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7bcb0caded
Коммит
57b17f068c
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Telegram
|
||||
module Bot
|
||||
class UpdatesController
|
||||
@@ -16,7 +18,7 @@ module Telegram
|
||||
# everything will be rewriten with #initialize.
|
||||
#
|
||||
# With `full` set to `true` it'll clear all cached instance variables.
|
||||
def recycle!(full = false)
|
||||
def recycle!(full = false) # rubocop:disable Style/OptionalBooleanParameter
|
||||
return unless full
|
||||
(instance_variables - IVARS_TO_KEEP).each do |ivar|
|
||||
remove_instance_variable(ivar)
|
||||
@@ -27,7 +29,8 @@ module Telegram
|
||||
|
||||
# Stubs session.
|
||||
def session
|
||||
@_session ||= Session::NullSessionHash.new
|
||||
@_session ||= # rubocop:disable Naming/MemoizedInstanceVariableName
|
||||
Session::NullSessionHash.new
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Ссылка в новой задаче
Block a user