about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2021-03-11 16:18:17 +0100
committerGitHub <noreply@github.com>2021-03-11 16:18:17 +0100
commit540af5fe053dd12e984bba59b10884c22d1f777e (patch)
tree231ba16ec183cab8467f3630f3d7182ab585f23e
parent23f345643eec43666c3eadd43df2c6d30f4676e7 (diff)
parentd3ea5a72901ee55c88ca5ed1e946abcf11538471 (diff)
Merge pull request #115879 from khumba/doc-black-disable
nixos/manual/writing-nixos-tests: document how to disable Black silently
-rw-r--r--nixos/doc/manual/development/writing-nixos-tests.xml11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/doc/manual/development/writing-nixos-tests.xml b/nixos/doc/manual/development/writing-nixos-tests.xml
index cab4c067e0d35..5f70f74d5d90d 100644
--- a/nixos/doc/manual/development/writing-nixos-tests.xml
+++ b/nixos/doc/manual/development/writing-nixos-tests.xml
@@ -449,5 +449,16 @@ import ./make-test-python.nix {
     '';
 }
 </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>