Skip to content

[staging-next-24.11] nixos/lib/test-driver: fix linting after compatibility clean‐up#359689

Merged
emilazy merged 1 commit intoNixOS:staging-next-24.11from
emilazy:push-rpnmplwovoxn
Nov 27, 2024
Merged

[staging-next-24.11] nixos/lib/test-driver: fix linting after compatibility clean‐up#359689
emilazy merged 1 commit intoNixOS:staging-next-24.11from
emilazy:push-rpnmplwovoxn

Conversation

@emilazy
Copy link
Member

@emilazy emilazy commented Nov 27, 2024

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
(cherry picked from commit d490680)

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

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
(cherry picked from commit d490680)
@emilazy emilazy merged commit 0f6738d into NixOS:staging-next-24.11 Nov 27, 2024
@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: testing Tooling for automated testing of packages and modules labels Nov 27, 2024
@emilazy emilazy deleted the push-rpnmplwovoxn branch November 27, 2024 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: testing Tooling for automated testing of packages and modules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant