Skip to content
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

Add typing for FixtureRequest.param #10133

Merged
merged 3 commits into from Jul 14, 2022

Conversation

nipunn1313
Copy link
Contributor

For now, mark it as Any until #8073 is solved

Closes #9514

  • [N/A] Include documentation when adding new features.
  • Include new tests or update existing tests when applicable.
    (added a type annotation in the file to prove it works)
  • Allow maintainers to push and squash when merging my commits. Please uncheck this if you prefer to squash the commits yourself.
  • Create a new changelog file in the changelog folder, with a name like <ISSUE NUMBER>.<TYPE>.rst. See changelog/README.rst for details.
  • Add yourself to AUTHORS in alphabetical order.

For now, mark it as Any until pytest-dev#8073 is solved

Fixes pytest-dev#9514
@nicoddemus
Copy link
Member

Failures in 3.11 can be ignored as they have been fixed by #10132.

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
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.

LGTM, thanks!

I will leave to @bluetech to given the final approve/merge. 😁

@RonnyPfannschmidt
Copy link
Member

I wonder how tricky it would actually be to have the requests class getattr return a bound generic of the subrequest

Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Seems fine to me as a stop gap.

I added a suggestion for a comment that makes the situation clear, for when we properly tackle this in the future.

src/_pytest/fixtures.py Show resolved Hide resolved
Co-authored-by: Ran Benita <ran@unusedvar.com>
@nicoddemus nicoddemus merged commit c1d1341 into pytest-dev:main Jul 14, 2022
@nicoddemus
Copy link
Member

Thanks @nipunn1313!

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.

error: "FixtureRequest" has no attribute "param"
4 participants