65cd3bc9338aeb7efe02c13eea9e7b9def3435b9,src/python/pants/option/parser.py,Parser,register,#Parser#,173

Before Change


      ancestor = ancestor._parent_parser

    self._validate(args, kwargs)
    dest = kwargs.get("dest") or self._select_dest(args)
    kwargs["dest"] = dest
    if "recursive" in kwargs:
      if self._scope_info.category == ScopeInfo.SUBSYSTEM:
        raise ParseError("Option {} in scope {} registered as recursive, but subsystem options "
                         "may not set recursive=True.".format(args[0], self.scope))

After Change


      if existing_scope is not None:
        raise RegistrationError("Option {} in scope {} already registered in {}".format(
          args[0], self.scope, _scope_str(existing_scope)))
    self._known_args.update(args)

  def _argparse_register(self, args, kwargs):
    Do the deferred argparse registration.
    // This check prevents repeat registration of the same option, e.g., during bootstrapping,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: 65cd3bc9338aeb7efe02c13eea9e7b9def3435b9
Time: 2015-10-29
Author: benjyw@gmail.com
File Name: src/python/pants/option/parser.py
Class Name: Parser
Method Name: register


Project Name: BindsNET/bindsnet
Commit Name: a5da87f488bf1db6c38d66d982be07de921e8688
Time: 2018-05-18
Author: djsaunde@umass.edu
File Name: bindsnet/network/topology.py
Class Name: Connection
Method Name: update


Project Name: BindsNET/bindsnet
Commit Name: a5da87f488bf1db6c38d66d982be07de921e8688
Time: 2018-05-18
Author: djsaunde@umass.edu
File Name: bindsnet/network/topology.py
Class Name: Conv2dConnection
Method Name: update