)]}'
{
  "commit": "90fa7d2fd5a26bd0eb933c5cd9297c0e0801dacb",
  "tree": "73d3eebe09ba0e424945e09f19029e5bf6ab4e10",
  "parents": [
    "2eead96aeba1ec15d258b0952b37cb5d8bfc4c4a"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Wed Apr 23 10:22:32 2025 +0100"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Thu Apr 24 00:13:23 2025 +0100"
  },
  "message": "gdb/python: keyword arguments for gdb.Color.escape_sequence\n\nGDB\u0027s Python documentation does make it clear that keywords arguments\nare supported for functions that take 2 or more arguments.  The\ndocumentation makes no promise for keyword argument support on\nfunctions that only take a single argument.\n\nThat said, I\u0027m a fan of keyword arguments, I think they help document\nthe code, and make intentions clearer, even for single argument\nfunctions.\n\nAs I\u0027m changing gdb.Color anyway (see previous commit), I\u0027d like to\nadd keyword argument support to gdb.Color.escape_sequence, even though\nthis is a single argument method.  This should be harmless for anyone\nwho doesn\u0027t want to use keywords, but adds the option for those of us\nthat do.\n\nI\u0027ve also removed a redundant check that the \u0027self\u0027 argument was a\ngdb.Color object; Python already ensures this is the case.\n\nAnd I have folded the check that the single argument is a bool into\nthe gdb_PyArg_ParseTupleAndKeywords call, this means that the error\nmessage will include the incorrect type name now, which should make\ndebugging issues easier.\n\nTests have been extended to cover both cases -- it appears the\nincorrect argument type error was not previously tested, so it is\nnow.\n\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "97801f859f0d22e775aeb735fa48c582826fc3fa",
      "old_mode": 33188,
      "old_path": "gdb/python/py-color.c",
      "new_id": "e208506c9d35ce4f13c5c3f65033c93d3c26e96e",
      "new_mode": 33188,
      "new_path": "gdb/python/py-color.c"
    },
    {
      "type": "modify",
      "old_id": "7f711583b2c4c7cc1e2bef5188d2066e243d4793",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.python/py-color.exp",
      "new_id": "3563d2212003107c2356e0caa7debc7d5b269fa0",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.python/py-color.exp"
    }
  ]
}
