summary refs log tree commit diff
path: root/nixos/doc/manual/development
diff options
context:
space:
mode:
authorBryan Gardiner <bog@khumba.net>2021-03-10 18:41:00 -0800
committerBryan Gardiner <bog@khumba.net>2021-03-10 18:56:52 -0800
commitd3ea5a72901ee55c88ca5ed1e946abcf11538471 (patch)
tree15bfc090c9c3b1c56def3071d334265cbb2da2f5 /nixos/doc/manual/development
parent72826cbd2c8db138386584d2e181f3b03d5abf36 (diff)
downloadnixpkgs-d3ea5a72901ee55c88ca5ed1e946abcf11538471.tar
nixpkgs-d3ea5a72901ee55c88ca5ed1e946abcf11538471.tar.gz
nixpkgs-d3ea5a72901ee55c88ca5ed1e946abcf11538471.tar.bz2
nixpkgs-d3ea5a72901ee55c88ca5ed1e946abcf11538471.tar.lz
nixpkgs-d3ea5a72901ee55c88ca5ed1e946abcf11538471.tar.xz
nixpkgs-d3ea5a72901ee55c88ca5ed1e946abcf11538471.tar.zst
nixpkgs-d3ea5a72901ee55c88ca5ed1e946abcf11538471.zip
nixos/manual/writing-nixos-tests: document how to disable Black silently
Diffstat (limited to 'nixos/doc/manual/development')
-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 cab4c067e0d..5f70f74d5d9 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>