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

Use classmethod instead of classmethod[Any, Any, Any] #7979

Merged

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
59 of 60 checks passed
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.

None yet

4 participants