Skip to content

Fix pytest completion list separators - #1287

Merged
fdncred merged 1 commit into
nushell:mainfrom
IanHollow:codex/pytest-list-separators
Oct 17, 2026
Merged

fdncred merged 1 commit into
nushell:mainfrom
IanHollow:codex/pytest-list-separators

Conversation

@IanHollow

Copy link
Copy Markdown
Contributor

Summary

Two pytest completion providers use semicolons inside list literals. On Nu 0.115.1 this silently returns only the first value; on Nu 0.116.1 importing the completion module fails with Unexpected semicolon in list. Replace those separators with commas, matching the neighboring providers, and add a standalone regression that sources the real completion file and checks the intended values.

-["w"; "a"]             ["plain"; "rewrite"]
+["w", "a"]             ["plain", "rewrite"]

Evidence

On native x86_64 Linux, using Nu 0.115.1 and 0.116.1:

  • Before: the same standalone regression fails on both versions. On 0.115.1 the log-mode provider returns [w] instead of [w, a] and completion omits a; assertion completion similarly omits rewrite. On 0.116.1 importing the original file fails at the semicolon.
  • After: module parsing and the standalone regression pass. Both provider lists and actual commandline complete --detailed results include all intended values.
  • nu --no-config-file --commands 'use toolkit.nu; toolkit check pr --and-exit' passes on both versions.
  • nu --no-config-file custom-completions/pytest/tests/pytest-completions.nu passes on both versions.

The regression script is run explicitly: toolkit test is currently a stub, so a successful toolkit check pr alone does not prove the assertions executed.

Assistance: OpenAI Codex implemented the change and regression, ran the recorded checks, and drafted this description.

Merge Danger

Door: two-way. Blast Radius: pytest completions. No pytest invocation or option semantics change; the providers return the same intended values.

Semicolons silently omit the second choice on Nu 0.115.1 and fail parsing on Nu 0.116.1. Use comma-separated lists and cover both providers and actual command-line completion values.

Validated module parsing, standalone assertions and toolkit check pr on both Nushell versions.
@fdncred
fdncred merged commit 44f8f25 into nushell:main Oct 17, 2026
1 check passed
@fdncred

fdncred commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants