Gavin Mak be6bda7f64 Flush NewContents cache in CheckPatchFormatted
Prior to https://crrev.com/c/5740609, NewContents never flushed cache
so the second NewContents() would always produce the same contents
post-yapf as as pre-yapf. Flush cache on second NewContents() call to
get updated file contents. Also fix the formatting a bit.

Bug: b/333744051
Change-Id: Ic627dd72675d7d3694b1978635ae047b38f06596
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357960
Auto-Submit: Gavin Mak <gavinmak@google.com>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42677}
2024-07-26 20:41:42 +00:00
..
2023-12-13 16:10:11 +00:00