Skip to content

Commit

Permalink
Merge pull request NixOS#115879 from khumba/doc-black-disable
Browse files Browse the repository at this point in the history
nixos/manual/writing-nixos-tests: document how to disable Black silently
  • Loading branch information
flokli authored Mar 11, 2021
2 parents 23f3456 + d3ea5a7 commit 540af5f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions nixos/doc/manual/development/writing-nixos-tests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit 540af5f

Please sign in to comment.