The same thing happens earlier in the file, and there's no comment about this there. I would get rid of it - it's pretty intuitive that `{` needs to be escaped in `.format()`, and should be easy to guess, from there, that the doubling is doing that.