git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #115879 from khumba/doc-black-disable

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

commit540af5fe053dd12e984bba59b10884c22d1f777e authorFlorian Klink <flokli@flokli.de> dateThu 11 Mar 2021, 16:18 (6 years ago) parent23f3456d3ea5a7
1 file changed+11
nixos/doc/manual/development/writing-nixos-tests.xml+11
nixos/doc/manual/development/writing-nixos-tests.xml+11
@@ -448,6 +448,17 @@ import ./make-test-python.nix {
448448 <replaceable>Python code…</replaceable>
449449 '';
450450}
451+</programlisting>
452+ This will produce a Nix warning at evaluation time. To fully disable the
453+ linter, wrap the test script in comment directives to disable the Black linter
454+ directly (again, don't commit this within the Nixpkgs repository):
455+<programlisting>
456+ testScript =
457+ ''
458+ # fmt: off
459+ <replaceable>Python code…</replaceable>
460+ # fmt: on
461+ '';
451462</programlisting>
452463 </para>
453464</section>