d6b1ade52fe313bd853667ea365c110ed06fc74a,src/python/pants/option/parser.py,Parser,_validate,#Parser#Any#Any#,290
Before Change
if not arg.startswith("--") and len(arg) > 2:
raise RegistrationError("Multicharacter option {} in {} must begin "
"with a double-dash".format(arg, scope_str))
if "nargs" in kwargs and kwargs["nargs"] != "?":
raise RegistrationError("nargs={} unsupported in registration of option {} in "
"{}.".format(kwargs["nargs"], args, scope_str))
if "required" in kwargs:
raise RegistrationError("required unsupported in registration of option {} in "
"{}.".format(args, scope_str))
After Change
if is_boolean_flag(kwargs) and "type" in kwargs:
error(BooleanOptionType)
if "implicit_value" in kwargs:
if is_boolean_flag(kwargs):
error(BooleanOptionImplicitVal)
elif kwargs["implicit_value"] is None:
error(ImplicitValIsNone)
for kwarg in kwargs:
if kwarg not in self._allowed_registration_kwargs:
error(InvalidKwarg, kwarg=kwarg)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: pantsbuild/pants
Commit Name: d6b1ade52fe313bd853667ea365c110ed06fc74a
Time: 2015-11-05
Author: benjyw@gmail.com
File Name: src/python/pants/option/parser.py
Class Name: Parser
Method Name: _validate
Project Name: home-assistant/home-assistant
Commit Name: 312de6b3a369bdc58dda94b2a78167ef38821cee
Time: 2017-09-26
Author: wjs.scanlon@gmail.com
File Name: homeassistant/components/climate/wink.py
Class Name: WinkThermostat
Method Name: operation_list
Project Name: home-assistant/home-assistant
Commit Name: e4c5108c9deb8ecdf296f7c8da5f9dc26789d930
Time: 2015-09-18
Author: stefan.jonasson@sitedirect.se
File Name: homeassistant/components/automation/__init__.py
Class Name:
Method Name: setup