class RuboCop::Cop::Style::FormatStringToken

def autocorrect_sequence(corrector, detected_sequence, token_range)

def autocorrect_sequence(corrector, detected_sequence, token_range)
  return if style == :unannotated
  name = detected_sequence.name
  return if name.nil?
  flags = detected_sequence.flags
  width = detected_sequence.width
  precision = detected_sequence.precision
  type = detected_sequence.style == :template ? 's' : detected_sequence.type
  correction = case style
               when :annotated then "%<#{name}>#{flags}#{width}#{precision}#{type}"
               when :template then "%#{flags}#{width}#{precision}{#{name}}"
               end
  corrector.replace(token_range, correction)
end