nixos/manual/writing-nixos-tests: document how to disable Black silently

This commit is contained in:
Bryan Gardiner 2021-03-10 18:41:00 -08:00
parent 72826cbd2c
commit d3ea5a7290
No known key found for this signature in database
GPG key ID: 53EFBCA063E6183C

View file

@ -448,6 +448,17 @@ import ./make-test-python.nix {
<replaceable>Python code…</replaceable>
'';
}
</programlisting>
This will produce a Nix warning at evaluation time. To fully disable the
linter, wrap the test script in comment directives to disable the Black linter
directly (again, don't commit this within the Nixpkgs repository):
<programlisting>
testScript =
''
# fmt: off
<replaceable>Python code…</replaceable>
# fmt: on
'';
</programlisting>
</para>
</section>