def parse_main(argv)
      defaults = {
        report: Inq::DEFAULT_REPORT_FILE,
      }

      opts = Okay::SimpleOpts.new(defaults: defaults)

      opts.banner = <<~EOF
        Usage: inq --repository REPOSITORY --date REPORT_DATE [--output REPORT_FILE]
               inq --config CONFIG_FILE --date REPORT_DATE
      EOF

      opts.separator "\nOptions:"

      opts.simple("--config CONFIG_FILE",
                  "YAML config file for automated reports.",
                  :config)

      opts.simple("--no-user-config",
                  "Don't load user configuration file.",
                  :no_user_config)

      opts.simple("--env-config",
                  "Use environment variables for configuration.",
                  "Read this first: https://inqrb.com/config",
                  :env_login)

      opts.simple("--repository USER/REPO", REPO_REGEXP,
                  "Repository to generate a report for.",
                  :repository)

      opts.simple("--date YYYY-MM-DD", DATE_REGEXP, "Last date of the report.",
                  :date)

      opts.simple("--output REPORT_FILE", format_regexp,
                  "Output file for the report.",
                  "Supported file formats: #{formats}.",
                  :report)

      opts.simple("--verbose", "Print debug information.", :verbose)
      opts.simple("-v", "--version", "Prints version information.", :version)
      opts.simple("-h", "--help", "Print help text.", :help)

      [opts, opts.parse(argv)]
    end
def parse_main(argv)
      defaults = {
        report: Inq::DEFAULT_REPORT_FILE,
      }

      opts = Okay::SimpleOpts.new(defaults: defaults)

      opts.banner = <<~EOF
        Usage: inq --repository REPOSITORY --date REPORT_DATE [--output REPORT_FILE]
               inq --config CONFIG_FILE --date REPORT_DATE
      EOF

      opts.separator "\nOptions:"

      opts.simple("--config CONFIG_FILE",
                  "YAML config file for automated reports.",
                  :config)

      opts.simple("--no-user-config",
                  "Don't load user configuration file.",
                  :no_user_config)

      opts.simple("--env-config",
                  "Use environment variables for configuration.",
                  "Read this first: https://inqrb.com/config",
                  :env_login)

      opts.simple("--repository USER/REPO", REPO_REGEXP,
                  "Repository to generate a report for.",
                  :repository)

      opts.simple("--date YYYY-MM-DD", DATE_REGEXP, "Last date of the report.",
                  :date)

      opts.simple("--output REPORT_FILE", format_regexp,
                  "Output file for the report.",
                  "Supported file formats: #{formats}.",
                  :report)

      opts.simple("--verbose", "Print debug information.", :verbose)
      opts.simple("-v", "--version", "Prints version information.", :version)
      opts.simple("-h", "--help", "Print help text.", :help)

      [opts, opts.parse(argv)]
    end
parse_main() is as short as can be managed. It's fine as-is.
 rubocop:disable Metrics/MethodLength
 This does a significant chunk of the work for parse().

 @return [Array] An array containing the +OptionParser+ and the result
   of running it.