Martin Liška <mli...@suse.cz> writes:
> On 10/13/22 12:03, Richard Sandiford wrote:
>> Martin Liška <mli...@suse.cz> writes:
>>> I think we should add how Python scripts should be formatted. I noticed
>>> that while reading the Modula-2 patchset where it follows the C/C++ style
>>> when it comes to Python files.
>>>
>>> Ready to be installed?
>>> Thanks,
>>> Martin
>> 
>> Did you consider requiring black formatting instead?  Maybe black -l79
>> to maintain the usual 80-character limit.
>
> No, the automatic formatting might be a next step. About 80 chars, can we 
> relax
> that for Python scripts? I think it's hairy restriction these days. 

In practice it seems to work well, even at 79 chars.  The default is 88
and I don't think the extra 8 or 9 columns are enough to make a different
rule for Python worth it.

FWIW, personally I use an 80-column editor for GCC stuff, and it would
be a pain to have to switch to something different to work on Python.

>> At least that way there's only one right answer.
>
> Yep. We can definitely recommend using black as an optional approach,
> what do you think?

IMO the real value is if it's the defined approach, rather than an
optional approach.  It's "format and forget", just like with clang-format.

Thanks,
Richard

Reply via email to