<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">On Fri, Jan 29, 2021 at 3:40 PM Thibaut Cuvelier <<a href="mailto:tcuvelier@lyx.org">tcuvelier@lyx.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>- The cosmetic changes are based on PEP8, which is the only style guide for Python. Highly similar patches already went into the code base less than a year ago (<a href="http://lists.lyx.org/pipermail/lyx-devel/2020-May/001464.html" target="_blank">http://lists.lyx.org/pipermail/lyx-devel/2020-May/001464.html</a>). Other style guides for Python are just more precise than PEP8 (e.g., Google: <a href="https://stackoverflow.com/a/2815311/1066843" target="_blank">https://stackoverflow.com/a/2815311/1066843</a>). I have yet to see an important open-source project that does not use PEP8 style guide. It's as unopiniated as opinion could get on Python.<br></div><div>For now, the Python scripts follow the WTF style guide: every committer does what they prefer, without any kind of consistency. Python is very different from other languages in that there is a real consensus in the community on one style guide (PHP is going in the same direction, but it's not yet as commonly used: <a href="https://www.php-fig.org/psr/psr-2/" target="_blank">https://www.php-fig.org/psr/psr-2/</a>). I am not proposing one style guide for C++ or Perl code, for instance.</div></div></blockquote><div><br></div><div>Some food for thought based on recent experience...</div><div><br></div><div>The idea of code style (and style application automation) is something that has been on my mind a lot lately. Applying the black utility [<a href="https://github.com/psf/black">https://github.com/psf/black</a>] for Python and clang-format utility [<a href="https://clang.llvm.org/docs/ClangFormat.html">https://clang.llvm.org/docs/ClangFormat.html</a>] for C/C++ to several projects I work on have helped reduce style discussion, ensure uniformity, and provide cognitive ease as code is considered.  It's to the point that several projects have early CI static analysis that ensures conformance to the applicable style.  While one may not love any particular style, having a standard does help with pattern recognition while reading code.</div><div><br></div><div>Regards,</div><div>Joel</div></div></div></div></div>