676c0e80b90e2e6293f7204db8cb57a412c53d8f,src/python/pants/option/custom_types.py,,list_type,#Any#,38

Before Change



  The value (on the command-line, in an env var or in the config file) must be a JSON list.
  
  if isinstance(s, (list, tuple)):
    return s
  try:
    ret = json.loads(s)
  except ValueError as e:
    raise _parse_error(s, e.message)
  if not isinstance(ret, list):
    raise _parse_error(s, "Value is not list")
  return ret

After Change


  The value (on the command-line, in an env var or in the config file) must be eval"able to a
  list or tuple.
  
  return _convert(s, (list, tuple))


def _convert(val, acceptable_types):
  Ensure that val is one of the acceptable types, converting it if needed.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 15

Instances


Project Name: pantsbuild/pants
Commit Name: 676c0e80b90e2e6293f7204db8cb57a412c53d8f
Time: 2014-12-08
Author: benjyw@gmail.com
File Name: src/python/pants/option/custom_types.py
Class Name:
Method Name: list_type


Project Name: pantsbuild/pants
Commit Name: 676c0e80b90e2e6293f7204db8cb57a412c53d8f
Time: 2014-12-08
Author: benjyw@gmail.com
File Name: src/python/pants/option/custom_types.py
Class Name:
Method Name: dict_type


Project Name: pantsbuild/pants
Commit Name: 8e119c2d4b65f2fa9b1da935a0d998f1ad6109ca
Time: 2015-09-09
Author: john.sirois@gmail.com
File Name: src/python/pants/option/custom_types.py
Class Name:
Method Name: _convert


Project Name: pantsbuild/pants
Commit Name: 676c0e80b90e2e6293f7204db8cb57a412c53d8f
Time: 2014-12-08
Author: benjyw@gmail.com
File Name: src/python/pants/option/custom_types.py
Class Name:
Method Name: list_type