From 294d6e30ab6e690233583fa196cd20b49ef9bc51 Mon Sep 17 00:00:00 2001 From: takahashim Date: Fri, 16 Aug 2024 20:32:46 +0900 Subject: [PATCH] update rubocop 1.65.1 --- lib/review/builder.rb | 2 +- lib/review/htmlbuilder.rb | 26 +++++++++++++------------- lib/review/idgxmlbuilder.rb | 14 +++++++------- lib/review/latexbuilder.rb | 12 ++++++------ lib/review/logger.rb | 2 +- lib/review/plaintextbuilder.rb | 2 +- lib/review/tocprinter.rb | 4 ++-- review.gemspec | 2 +- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lib/review/builder.rb b/lib/review/builder.rb index c1ab19b4e..93b44b96d 100644 --- a/lib/review/builder.rb +++ b/lib/review/builder.rb @@ -773,7 +773,7 @@ def over_secnolevel?(n) ## override TextUtils::detab def detab(str, num = nil) if num - super(str, num) + super elsif @tabwidth super(str, @tabwidth) else diff --git a/lib/review/htmlbuilder.rb b/lib/review/htmlbuilder.rb index 625c5c415..f00d5af03 100644 --- a/lib/review/htmlbuilder.rb +++ b/lib/review/htmlbuilder.rb @@ -455,7 +455,7 @@ def read(lines) def list(lines, id, caption, lang = nil) puts %Q(
) - super(lines, id, caption, lang) + super puts '
' end @@ -480,7 +480,7 @@ def list_body(_id, lines, lang) def source(lines, caption = nil, lang = nil) puts %Q(
) - super(lines, caption, lang) + super puts '
' end @@ -500,7 +500,7 @@ def source_body(lines, lang) def listnum(lines, id, caption, lang = nil) puts %Q(
) - super(lines, id, caption, lang) + super puts '
' end @@ -737,7 +737,7 @@ def table(lines, id = nil, caption = nil) else puts %Q(
) end - super(lines, id, caption) + super puts '
' end @@ -1117,9 +1117,9 @@ def inline_sec(id) chap, id2 = extract_chapter_id(id) n = chap.headline_index.number(id2) anchor = 'h' + n.tr('.', '-') - %Q(#{super(id)}) + %Q(#{super}) else - super(id) + super end rescue KeyError app_error "unknown headline: #{id}" @@ -1129,9 +1129,9 @@ def inline_sectitle(id) if @book.config['chapterlink'] chap, id2 = extract_chapter_id(id) anchor = 'h' + chap.headline_index.number(id2).tr('.', '-') - %Q(#{super(id)}) + %Q(#{super}) else - super(id) + super end rescue KeyError app_error "unknown headline: #{id}" @@ -1154,7 +1154,7 @@ def inline_column_chap(chapter, id) end def inline_list(id) - str = super(id) + str = super chapter, id = extract_chapter_id(id) if @book.config['chapterlink'] %Q(#{str}) @@ -1164,7 +1164,7 @@ def inline_list(id) end def inline_table(id) - str = super(id) + str = super chapter, id = extract_chapter_id(id) if @book.config['chapterlink'] %Q(#{str}) @@ -1174,7 +1174,7 @@ def inline_table(id) end def inline_img(id) - str = super(id) + str = super chapter, id = extract_chapter_id(id) if @book.config['chapterlink'] %Q(#{str}) @@ -1184,7 +1184,7 @@ def inline_img(id) end def inline_eq(id) - str = super(id) + str = super chapter, id = extract_chapter_id(id) if @book.config['chapterlink'] %Q(#{str}) @@ -1308,7 +1308,7 @@ def inline_balloon(str) end def inline_raw(str) # rubocop:disable Lint/UselessMethodDefinition - super(str) + super end def nofunc_text(str) diff --git a/lib/review/idgxmlbuilder.rb b/lib/review/idgxmlbuilder.rb index 7d7e3b612..aaefb1f35 100644 --- a/lib/review/idgxmlbuilder.rb +++ b/lib/review/idgxmlbuilder.rb @@ -273,7 +273,7 @@ def inline_column_chap(chapter, id) end def inline_list(id) - "#{super(id)}" + "#{super}" end def list_header(id, caption, _lang) @@ -304,7 +304,7 @@ def codelines_body(lines) def list(lines, id, caption, lang = nil) puts '' - super(lines, id, caption, lang) + super puts '' end @@ -329,7 +329,7 @@ def emlistnum(lines, caption = nil, _lang = nil) def listnum(lines, id, caption, lang = nil) puts '' - super(lines, id, caption, lang) + super puts '' end @@ -389,15 +389,15 @@ def quote(lines) end def inline_table(id) - "#{super(id)}" + "#{super}" end def inline_img(id) - "#{super(id)}" + "#{super}" end def inline_eq(id) - "#{super(id)}" + "#{super}" end def inline_imgref(id) @@ -725,7 +725,7 @@ def inline_sub(str) end def inline_raw(str) - super(str).gsub('\\n', "\n") + super.gsub('\\n', "\n") end def inline_hint(str) diff --git a/lib/review/latexbuilder.rb b/lib/review/latexbuilder.rb index 29f25d19a..491d6a9a0 100644 --- a/lib/review/latexbuilder.rb +++ b/lib/review/latexbuilder.rb @@ -556,7 +556,7 @@ def image_header(id, caption) end def parse_metric(type, metric) - s = super(type, metric) + s = super if @book.config['pdfmaker']['use_original_image_size'] && s.empty? && !metric.present? return ' ' # pass empty to \reviewincludegraphics end @@ -1292,11 +1292,11 @@ def inline_hd_chap(chap, id) def inline_sec(id) if @book.config['chapterlink'] - n = super(id) + n = super anchor = n.tr('.', '-') macro('reviewsecref', n, sec_label(anchor)) else - super(id) + super end rescue KeyError app_error "unknown headline: #{id}" @@ -1306,9 +1306,9 @@ def inline_sectitle(id) if @book.config['chapterlink'] chap, id2 = extract_chapter_id(id) anchor = chap.headline_index.number(id2).tr('.', '-') - macro('reviewsecref', super(id), sec_label(anchor)) + macro('reviewsecref', super, sec_label(anchor)) else - super(id) + super end end @@ -1321,7 +1321,7 @@ def inline_column_chap(chapter, id) end def inline_raw(str) # rubocop:disable Lint/UselessMethodDefinition - super(str) + super end def inline_sub(str) diff --git a/lib/review/logger.rb b/lib/review/logger.rb index caa70a02f..3ef10daf2 100644 --- a/lib/review/logger.rb +++ b/lib/review/logger.rb @@ -3,7 +3,7 @@ module ReVIEW class Logger < ::Logger def initialize(io = $stderr, progname: '--') - super(io, progname: progname) + super self.formatter = ->(severity, _datetime, name, msg) { "#{severity} #{name}: #{msg}\n" } end diff --git a/lib/review/plaintextbuilder.rb b/lib/review/plaintextbuilder.rb index 991a1c530..d041a48ea 100644 --- a/lib/review/plaintextbuilder.rb +++ b/lib/review/plaintextbuilder.rb @@ -362,7 +362,7 @@ def compile_href(url, label) end def inline_raw(str) - super(str).gsub('\\n', "\n") + super.gsub('\\n', "\n") end def inline_hidx(_str) diff --git a/lib/review/tocprinter.rb b/lib/review/tocprinter.rb index 49f27c3f6..e7b86a0ac 100644 --- a/lib/review/tocprinter.rb +++ b/lib/review/tocprinter.rb @@ -21,12 +21,12 @@ def headline(level, label, caption) print "\x01H#{level}\x01" end # embed header information for tocparser - super(level, label, caption) + super end def base_block(type, lines, caption = nil) puts "\x01STARTLIST\x01" - super(type, lines, caption) + super puts "\x01ENDLIST\x01" end diff --git a/review.gemspec b/review.gemspec index 0dbe77e4d..fa26c2ba7 100644 --- a/review.gemspec +++ b/review.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |gem| gem.add_development_dependency('playwright-runner') gem.add_development_dependency('pygments.rb') gem.add_development_dependency('rake') - gem.add_development_dependency('rubocop', '~> 1.59.0') + gem.add_development_dependency('rubocop', '~> 1.65.1') gem.add_development_dependency('rubocop-performance') gem.add_development_dependency('rubocop-rake') gem.add_development_dependency('simplecov')