)]}'
{
  "commit": "8152f4af3f6c03beaf2660026240f0fdce7feecc",
  "tree": "3d1cb1b5a255f3717be7039fd71dd1c03d07501d",
  "parents": [
    "116d60bdd3fdfe8d97c6afe99370910db56f1b92"
  ],
  "author": {
    "name": "Adam Turner",
    "email": "9087854+AA-Turner@users.noreply.github.com",
    "time": "Fri May 08 20:36:19 2026 +0100"
  },
  "committer": {
    "name": "Jukka Lehtosalo",
    "email": "jukka.lehtosalo@iki.fi",
    "time": "Sun May 10 12:20:57 2026 +0100"
  },
  "message": "Respect file config comments for stale modules (#21444)\n\nIn mypy 1.19, re-running `mypy` with a saved cache and a file containing\nan inline configuration comment (e.g. `# mypy:\ndisable-error-code\u003d\"import-not-found\"`) acted \u0027correctly\u0027, i.e. the same\nbehaviour on the first run vs subsequent runs.\n\nIn mypy 1.20 and newer, this is no longer the case. Running `mypy` with\na pre-existing cache fails to respect inline configuration comments for\nstale modules, leading to confusing false-positive errors that can be\nhard to debug.\n\nThis PR introduces a failing test as at current master, and then a fix\nfor the issue. I believe this is the right fix, though happy to change\nas suggested by the maintainers, I\u0027m not nearly as familiar with mypy\ninternals.\n\nNotably also from L2376-80, it\u0027s by design that file-level comments\naren\u0027t cached:\n\n```python\n    # Note that the options we store in the cache are the options as\n    # specified by the command line/config file and *don\u0027t* reflect\n    # updates made by inline config directives in the file. This is\n    # important, or otherwise the options would never match when\n    # verifying the cache.\n```\n\nI believe that this regression was introduced in #20773\n\nA\n\nCo-authored-by: Adam Turner \u003cturner@hudson-trading.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "21a5559b329a3cf21f405b1834ddd0eb4ad42241",
      "old_mode": 33188,
      "old_path": "mypy/build.py",
      "new_id": "8d5db0bab8dfaef32b0c392117e9d4f98354a04b",
      "new_mode": 33188,
      "new_path": "mypy/build.py"
    },
    {
      "type": "modify",
      "old_id": "6911a350376f3b70e0a1a210fbca0725662a4ddd",
      "old_mode": 33188,
      "old_path": "test-data/unit/check-incremental.test",
      "new_id": "db15b73419109b55164061b38ece040a43c9083f",
      "new_mode": 33188,
      "new_path": "test-data/unit/check-incremental.test"
    }
  ]
}
