Skip to content

Conversation

alexmojaki
Copy link
Contributor

@alexmojaki alexmojaki commented Oct 21, 2023

Change Summary

Adds __or__ and __ror__ methods to PydanticRecursiveRef so that a | b returns a typing.Union.

Related issue number

Closes #7875

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
  • 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: @davidhewitt

@alexmojaki
Copy link
Contributor Author

please review

Copy link
Contributor

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@davidhewitt davidhewitt merged commit 93e4d23 into pydantic:main Oct 24, 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.

Getting unsupported operand type(s) for |: 'PydanticRecursiveRef' and 'NoneType' with PEP 604 formatting and recursive classes
2 participants