Skip to content

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

Merged
cwognum merged 2 commits into
mainfrom
chore/improve-typing
Sep 19, 2024
Merged

Type the return type of @model_validator(mode="after") with Self#198
cwognum merged 2 commits into
mainfrom
chore/improve-typing

Conversation

@cwognum

@cwognum cwognum commented Sep 11, 2024

Copy link
Copy Markdown
Collaborator

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 requested a review from jstlaurent September 11, 2024 20:00
@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

cwognum commented Sep 11, 2024

Copy link
Copy Markdown
Collaborator Author

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

@Andrewq11 Andrewq11 left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread polaris/dataset/_competition_dataset.py

@jstlaurent jstlaurent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Comment thread polaris/dataset/_competition_dataset.py
@cwognum cwognum merged commit c1df924 into main Sep 19, 2024
@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