8000 Use `classmethod` instead of `classmethod[Any, Any, Any]` by Mr-Pepe · Pull Request #7979 · pydantic/pydantic · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@Mr-Pepe
Copy link
Contributor
@Mr-Pepe Mr-Pepe commented Oct 31, 2023

Change Summary

Using classmethod is equivalent to classmethod[Any, Any, Any] and was recommended in this comment. This change fixes an issue discussed here. There is no expectation that code within if TYPE_CHECKING blocks is always executable, but this seems like a quick win with no downsides.

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist -> Type checks still pass
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @Kludex

@Mr-Pepe Mr-Pepe marked this pull request as ready for review October 31, 2023 09:21
@Mr-Pepe
Copy link
Contributor Author
Mr-Pepe commented Oct 31, 2023

please review

@sydney-runkle sydney-runkle added the relnotes-fix Used for bugfixes. label Nov 6, 2023
Copy link
Member
@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

LGTM

@sydney-runkle sydney-runkle merged commit d2abc7b into pydantic:main Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0