mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 13:08:39 +03:00
Merge pull request #115879 from khumba/doc-black-disable
nixos/manual/writing-nixos-tests: document how to disable Black silently
This commit is contained in:
commit
540af5fe05
@ -448,6 +448,17 @@ import ./make-test-python.nix {
|
|||||||
<replaceable>Python code…</replaceable>
|
<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>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
Loading…
Reference in New Issue
Block a user