Skip to content

Fix -V to show version information#14382

Open
nicoddemus wants to merge 1 commit intopytest-dev:mainfrom
nicoddemus:14381-version
Open

Fix -V to show version information#14382
nicoddemus wants to merge 1 commit intopytest-dev:mainfrom
nicoddemus:14381-version

Conversation

@nicoddemus
Copy link
Copy Markdown
Member

This regressed in #13575.

Fixes #14381.

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Apr 11, 2026
@nicoddemus nicoddemus added the backport 9.0.x apply to PRs at any point; backports the changes to the 9.0.x branch label Apr 11, 2026
@nicoddemus nicoddemus marked this pull request as ready for review April 11, 2026 13:36
if isinstance(new_args, Sequence) and new_args.count("--version") == 1:
if (
isinstance(new_args, Sequence)
and (new_args.count("--version") + new_args.count("-V")) == 1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't that missbehave if someone passes both argument variants at once

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

Labels

backport 9.0.x apply to PRs at any point; backports the changes to the 9.0.x branch bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version short name (-V) does not appear to work

3 participants