From d3ea5a72901ee55c88ca5ed1e946abcf11538471 Mon Sep 17 00:00:00 2001 From: Bryan Gardiner Date: Wed, 10 Mar 2021 18:41:00 -0800 Subject: nixos/manual/writing-nixos-tests: document how to disable Black silently --- nixos/doc/manual/development/writing-nixos-tests.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'nixos') 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 @@ -448,6 +448,17 @@ import ./make-test-python.nix { Python code… ''; } + + 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): + + testScript = + '' + # fmt: off + Python code… + # fmt: on + ''; -- cgit 1.4.1