[Neuroimaging] Integrating code formatting in NiBabel

Matthew Brett matthew.brett at lis.ac.uk
Wed Dec 28 18:14:26 EST 2022


Hi,

On Wed, Dec 28, 2022 at 9:11 PM Christopher Markiewicz
<markiewicz at stanford.edu> wrote:
>
> Hi Zvi,
>
> I agree we should switch to auto-formatting. I started on a PR a while back to switch to using blue and isort: https://github.com/nipy/nibabel/pull/1124
>
> There are a couple issues I have with black that I hoped to resolve with blue, but the larger one is in limbo (which is why 1124 stalled): https://github.com/grantjenks/blue/pull/83
>
> The lesser one is that I prefer single quotes. If others feel strongly about black, I'm okay losing that argument here as in so many other places. The main thing that I would insist on is that chunks of code that are more understandable in a tabular format than a tree format need to be protected from the formatter.
>
> Happy to continue the discussion here or on GitHub.

Only to note that Astropy recently committed itself to using Black,
after a fairly long discussion and an Astropy Proposal for
Enhancement:

https://github.com/astropy/astropy-APEs/blob/main/APE20.rst

https://docs.astropy.org/en/latest/development/codeguide.html#coding-style-conventions

I also find I prefer single-quoted strings, for some reason, but -
probably like Chris - I don't feel strongly about it.

Cheers,

Matthew


More information about the Neuroimaging mailing list