Re: [BuildStream] [Development topic] Use black to format code
- From: Jürg Billeter <j bitron ch>
- To: Chandan Singh <chandan chandansingh net>, Darius Makovsky <darius makovsky codethink co uk>
- Cc: buildstream-list gnome org
- Subject: Re: [BuildStream] [Development topic] Use black to format code
- Date: Fri, 08 Nov 2019 12:38:38 +0100
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]