Re: [BuildStream] [Development topic] Use black to format code



On Tue, 2019-11-05 at 15:57 +0000, Chandan Singh wrote:
If we follow something like above, we shouldn't need blanket reformatting
commits from an automation. Rather, our codebase would be formatted correctly
at all points in history.

There's one exception to the above rule - when Black decides to change some
formatting style. This doesn't happen very often but can happen as the
formatter isn't considered stable just yet. To mitigate this, we can pin the
Black version number to ensure that we keep getting stable output. And, we can
bump it consciously on a periodic basis. Again, this would behave similar to how
we pin versions of our other dependencies.

Are they planning to stabilize the formatting style? Could it make
sense to wait for that to happen?

I really want to avoid periodic reformat commits. A one-time reformat
commit is bad enough due to likely requiring manual rebase of all
development branches. Periodic reformatting would probably outweigh the
advantages of automatic formatting. It depends on how much the
formatting style changes, of course.

Cheers,
Jürg



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]