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

Type the return type of @model_validator(mode="after") with Self #198

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

cwognum
Copy link
Collaborator

@cwognum cwognum commented Sep 11, 2024

Changelogs

  • Type the return type of @model_validator(mode="after") with Self

Checklist:

  • Was this PR discussed in an issue? It is recommended to first discuss a new feature into a GitHub issue before opening a PR.
  • Add tests to cover the fixed bug(s) or the newly introduced feature(s) (if appropriate).
  • Update the API documentation if a new function is added, or an existing one is deleted.
  • Write concise and explanatory changelogs above.
  • If possible, assign one of the following labels to the PR: feature, fix, chore, documentation or test (or ask a maintainer to do it for you).

This came up in #186 , but I only saw it after merging. See #186 (comment) .

@cwognum cwognum added the chore label Sep 11, 2024
@cwognum cwognum self-assigned this Sep 11, 2024
@cwognum cwognum changed the title Added Self type hint for model validators in 'after' mode Type the return type of @model_validator(mode="after") with Self Sep 11, 2024
@cwognum
Copy link
Collaborator Author

cwognum commented Sep 11, 2024

Sorry for not waiting for your response @jstlaurent ! Quickly opened this PR to still address the feedback! 😄

Copy link
Contributor

@Andrewq11 Andrewq11 left a comment

Choose a reason for hiding this comment

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

Thanks @cwognum 🚀

Left a single comment. Looks good to me once that is addressed.

polaris/dataset/_competition_dataset.py Show resolved Hide resolved
Copy link
Contributor

@jstlaurent jstlaurent left a comment

Choose a reason for hiding this comment

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

👍

polaris/dataset/_competition_dataset.py Show resolved Hide resolved
@cwognum cwognum merged commit c1df924 into main Sep 19, 2024
4 checks passed
@cwognum cwognum deleted the chore/improve-typing branch September 19, 2024 01:53
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.

3 participants