319d55448cf4f3bd86fc56987a495f2e2858dc62,src/python/pants/option/parser.py,Parser,parse_args,#Parser#Any#Any#,136

Before Change


          flag_vals.append(v)

      for arg in args:
        if is_bool:
          if arg in flag_value_map:
            flag_vals.append("true" if kwargs["action"] == "store_true" else "false")
            consume_flag(arg)
          elif self._inverse_arg(arg) in flag_value_map:
            flag_vals.append("false" if kwargs["action"] == "store_true" else "true")
            consume_flag(self._inverse_arg(arg))
        else:
          if arg in flag_value_map:
            for v in flag_value_map[arg]:

After Change


        // --foo, but with the inverse implicit and explicit values.
        if kwargs.get("type") == bool:
          inverse_arg = self._inverse_arg(arg)
          if inverse_arg in flag_value_map:
            flag_value_map[arg] = [self._invert(v) for v in flag_value_map[inverse_arg]]
            implicit_value = self._invert(implicit_value)
            del flag_value_map[inverse_arg]

        if arg in flag_value_map:
          for v in flag_value_map[arg]:
            add_flag_val(v)
          consume_flag(arg)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: pantsbuild/pants
Commit Name: 319d55448cf4f3bd86fc56987a495f2e2858dc62
Time: 2016-03-31
Author: benjyw@gmail.com
File Name: src/python/pants/option/parser.py
Class Name: Parser
Method Name: parse_args


Project Name: mynlp/ccg2lambda
Commit Name: 5b5d9a9aedf8e11b9609d28b26b6488bc20cb08b
Time: 2017-03-24
Author: pascual@nii.ac.jp
File Name: scripts/semantic_types.py
Class Name:
Method Name: merge_dynamic_libraries


Project Name: mindsdb/mindsdb
Commit Name: 951e8d5963134c6dc155b21695b4710042d52db8
Time: 2020-07-15
Author: stpmax@yandex.ru
File Name: mindsdb/api/mysql/mysql_proxy/datahub/datanodes/mindsdb_datanode.py
Class Name: MindsDBDataNode
Method Name: select