Looking a bit more closely, depot tools currently appears to largely use a 2 space indent.
TBH I don't feel too strongly about this, except:
- I'm editing a file which uses a 4 space indent for the first level of indenting, and then 2 spaces for the rest (!!)
- git cl upload complained that the formatting was incorrect
- I reformatted everything per git cl format
- The reviewer pushed back against git cl format changing everything to a 2 space indent, because
pyt...@chromium.org had pushed back on this strongly in the past
Unfortunately, I don't think there's a way to change .yapf.conf to use the "majority indenting" in a file—or if there is, I can't find it. If I go with 4 space indents, I have to ignore the presubmit checks complaining about misformatted code.
But I would like to land my change, and so I would like a definitive opinion on which way to go for depot tools :)
Daniel