Thanks for driving this Ricky! I'm *very* excited for it.

Just want to call out that you can use:
$ ./mach lint -wo --fix

to reformat all the files you have touched (either in the working directory
or outgoing commits). For more usage docs, see:
https://firefox-source-docs.mozilla.org/code-quality/lint/usage.html

-Andrew

On Mon, Oct 12, 2020 at 1:05 PM Ricky Stewart <rstew...@mozilla.com> wrote:

> Hello everyone,
>
> If you don't write Python code in mozilla-central, you can stop reading
> now.
>
> On October 19, 2020 we will be officially adopting the black Python style
> for all our Python code in mozilla-central.
>
> black (https://black.readthedocs.io/en/stable/) is an opinionated, fast,
> and correct auto-formatter for Python. It is an increasingly popular
> autoformatter which might be considered the de facto standard for Python
> code (like clang-format and jslint are for C++ and JS). It is already used
> by several Mozilla projects, including Release Engineering, Lando, and
> moz-phab.
>
> black makes it easy for us to reliably format all our Python code in a
> consistent way, making the codebase easier to read on the whole and
> allowing us to spend more time in code review discussing substantive issues
> over trivial formatting matters.
>
> This policy change will affect all Python code in-tree, including
> sandboxed Python code used by the build system (.configure, .build, and
> .mozbuild files).
>
> As part of this policy change, we plan on doing a one-time auto-reformat
> on October 19 of all Python code in the entire repository. In addition,
> mach lint (
> https://firefox-source-docs.mozilla.org/code-quality/lint/linters/black.html)
> and reviewbot will be updated to print warnings for Python source files
> that violate the black style. Just like with C/C++ or Rust, we won’t
> backout offending changes but instead will do regular refreshes of the tree.
>
> If there are any questions, please let me know!
>
> Ricky
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to