Class: Homebrew::DevCmd::UpdatePythonResources Private

Inherits:
AbstractCommand show all
Defined in:
dev-cmd/update-python-resources.rb,
sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Defined Under Namespace

Classes: Args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, dev_cmd?, #initialize, parser, ruby_cmd?

Methods included from Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_unmarked, #pretty_upgradable, #pretty_warning

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#argsHomebrew::DevCmd::UpdatePythonResources::Args

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



10
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/update_python_resources.rbi', line 10

def args; end

#runvoid

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'dev-cmd/update-python-resources.rb', line 44

def run
  Homebrew.install_bundler_gems!(groups: ["ast"])
  require "utils/pypi"

  args.named.to_formulae.each do |formula|
    # These options may only be used on third-party taps.
    if formula.tap&.official?
      ignore_errors = false
      ignore_main_package_cooldown = false
    else
      ignore_errors = args.ignore_errors?
      ignore_main_package_cooldown = args.ignore_main_package_cooldown?
    end
    PyPI.update_python_resources! formula,
                                  version:                      args.version,
                                  package_name:                 args.package_name,
                                  extra_packages:               args.extra_packages,
                                  exclude_packages:             args.exclude_packages,
                                  install_dependencies:         args.install_dependencies?,
                                  print_only:                   args.print_only?,
                                  quiet:                        args.quiet? || args.silent?,
                                  verbose:                      args.verbose?,
                                  ignore_errors:                ignore_errors,
                                  ignore_non_pypi_packages:     args.ignore_non_pypi_packages?,
                                  ignore_main_package_cooldown: ignore_main_package_cooldown
  end
end