nixos/lib/test-driver: fix linting after compatibility clean‐up#359060
nixos/lib/test-driver: fix linting after compatibility clean‐up#359060emilazy merged 1 commit intoNixOS:stagingfrom
Conversation
The previous commit removed the handling of `dict` arguments, but
didn’t adjust the type, leading to the following type-checking error:
test_driver/driver.py:216: error: Argument 1 to "NixStartScript" has incompatible type "str | dict[Any, Any]"; expected "str" [arg-type]
It also left an unused import that Ruff is unhappy about:
build/lib/test_driver/driver.py:11:22: F401 [*] `colorama.Fore` imported but unused
…
build/lib/test_driver/driver.py:11:28: F401 [*] `colorama.Style` imported but unused
Fixes: 71306e6
wolfgangwalther
left a comment
There was a problem hiding this comment.
Thanks for cleaning up after my cleanup.
| from colorama import Fore, Style | ||
|
|
There was a problem hiding this comment.
I double checked, colorama is still used in logger.py, so we can't remove it as a nix dep entirely.
|
Successfully created backport PR for |
|
Probably best to test that at least one NixOS test can pass after making test driver changes 😅 Thankfully it was an easy fix (and |
|
Right... I think I ran more tests on the bigger branch going into master, but not so much on staging. |
|
What I would really like to have... is a some kind of tool / script that would cherry-pick a change from a staging-based branch to master, then test it there. This is what I do manually most of the time, but it's annoying. Do you know any such tool already or is that something I'd have to write myself? |
|
When your change doesn’t depend on stuff already in Of course, that means that you don’t test your change against all the other changes in |
Ah. I hadn't considered this. Right, this would make a lot of sense.
I think the machine is actually big enough. I do have an account on the darwin community builder, too. Will try the merge-base approach and see how that goes. |
The previous commit removed the handling of
dictarguments, but didn’t adjust the type, leading to the following type-checking error:It also left an unused import that Ruff is unhappy about:
Fixes: 71306e6
cc @wolfgangwalther
Things done
nixosTests.simplenix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.