nixpkgs/nixos/lib
aszlig c362a28fcf
nixos/testing: Switch from black to pyflakes
So far, we have used "black" for formatting the test code, which is
rather strict and opinionated and when used inline in Nix expressions it
creates all sorts of trouble.

One of the main annoyances is that when using strings coming from Nix
expressions (eg. store paths or option definitions from NixOS modules),
completely unrelated changes could cause tests to fail, since eg. black
wants lines to be broken.

Another downside of enforcing a certain kind of formatting is that it
makes the Nix expression code inconsistent because we're mixing two
spaces of indentation (common in nixpkgs) with four spaces of
indentation as defined in PEP-8. While this is perfectly fine for
standalone Python files, it really looks ugly and inconsistent IMO when
used within Nix strings.

What we actually want though is a linter that catches problems early on
before actually running the test, because this is *actually* helping in
development because running the actual VM test takes much longer.

This is the reason why I switched from black to pyflakes, because the
latter actually has useful checks, eg. usage of undefined variables,
invalid format arguments, duplicate arguments, shadowed loop vars and
more.

Signed-off-by: aszlig <aszlig@nix.build>
Closes: https://github.com/NixOS/nixpkgs/issues/72964
2021-05-09 02:26:37 +02:00
..
make-options-doc nixosOptionsDoc: add markdown formatting 2021-04-13 10:10:40 -07:00
test-driver nixos/test-driver: Allow interactive testing on Wayland-only setups 2021-05-04 16:23:02 +02:00
build-vms.nix nixos: fix qemu_test being used in normal VMs 2020-10-21 16:38:04 +02:00
eval-config.nix Merge pull request #51850 from roberth/nixos-pure 2020-08-24 04:29:37 +02:00
from-env.nix
make-channel.nix Remove incorrect sentence from make-channel comment 2018-11-04 20:45:49 +01:00
make-disk-image.nix Merge pull request #120489 from samueldr/fix/make-disk-image-auto-size 2021-04-26 10:34:15 +02:00
make-ext4-fs.nix nixos/lib/make-ext4-fs: fix after mkfs.ext4 refactoring 2020-07-26 22:49:55 +02:00
make-iso9660-image.nix nixos: use nativeBuildInputs in make- iso9660-image and system-tarball 2020-11-18 14:05:30 +01:00
make-iso9660-image.sh make-iso9660-image: produce stable GPT disk GUID 2020-07-20 11:16:59 +02:00
make-squashfs.nix squashfs: use -no-hardlinks for reproducible squashfs images (#114454) 2021-02-28 18:03:50 +00:00
make-system-tarball.nix nixos: use nativeBuildInputs in make- iso9660-image and system-tarball 2020-11-18 14:05:30 +01:00
make-system-tarball.sh use closure-info for building system tarball 2018-11-07 12:52:53 +08:00
qemu-flags.nix nixos/qemu-flags: add ppc64 2021-03-05 01:57:54 -08:00
testing-python.nix nixos/testing: Switch from black to pyflakes 2021-05-09 02:26:37 +02:00
utils.nix nixos/{containers,cri-o,podman}: move copyFile to nixos/lib/utils 2020-09-24 10:01:47 +10:00