Skip to content

[PR #13559] Added "int" & "float" to the argparsing type Literal #13560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 24, 2025

Conversation

NayeemJohnY
Copy link
Contributor

Closes #13559
Added Supported 'int' & 'float' types are to valid type Literal.

@NayeemJohnY NayeemJohnY changed the title Added "int" & "float" to the argparsing type Literal (Closes #13559) [PR #13543] Added "int" & "float" to the argparsing type Literal Jun 24, 2025
Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @NayeemJohnY!

To be able to merge it, however, we still need:

  • Tests for each new option to ensure they work as intended and avoid future regressions.
  • A CHANGELOG entry.

@NayeemJohnY NayeemJohnY changed the title [PR #13543] Added "int" & "float" to the argparsing type Literal [PR #13559] Added "int" & "float" to the argparsing type Literal Jun 24, 2025
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Jun 24, 2025
@NayeemJohnY
Copy link
Contributor Author

Thanks @nicoddemus for the feedback.
Added a CHANGELOG entry.
Test already exists for these 2 types. https://github.com/pytest-dev/pytest/blob/main/testing/test_config.py#L853-L927

Thanks.

@nicoddemus
Copy link
Member

Ahh I see, thanks @NayeemJohnY!

@nicoddemus nicoddemus added the backport 8.4.x apply to PRs at any point; backports the changes to the 8.4.x branch label Jun 24, 2025
@nicoddemus nicoddemus enabled auto-merge (squash) June 24, 2025 16:31
@nicoddemus nicoddemus merged commit ae73461 into pytest-dev:main Jun 24, 2025
36 checks passed
Copy link

patchback bot commented Jun 24, 2025

Backport to 8.4.x: 💚 backport PR created

✅ Backport PR branch: patchback/backports/8.4.x/ae7346114d65e3a2c0ccd77af8a0ca00012cd91d/pr-13560

Backported as #13562

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jun 24, 2025
Fixes #13559.

---------

Co-authored-by: Bruno Oliveira <[email protected]>
(cherry picked from commit ae73461)
nicoddemus added a commit that referenced this pull request Jun 24, 2025
Fixes #13559.

---------


(cherry picked from commit ae73461)

Co-authored-by: NayeemJohn <[email protected]>
Co-authored-by: Bruno Oliveira <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 8.4.x apply to PRs at any point; backports the changes to the 8.4.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.

argparsing.py: Supported 'int' & 'float' types are not added to valid type Literal
2 participants