Skip to content

fix: update is_union function to support python 3.10+ union syntax#65

Open
NJABULO-NDLOVU wants to merge 2 commits intofaust-streaming:masterfrom
NJABULO-NDLOVU:support-new-union-syntax
Open

fix: update is_union function to support python 3.10+ union syntax#65
NJABULO-NDLOVU wants to merge 2 commits intofaust-streaming:masterfrom
NJABULO-NDLOVU:support-new-union-syntax

Conversation

@NJABULO-NDLOVU
Copy link

Description

  • Add check for types.UnionType to handle new union syntax

(int, False),
(Union[int, bytes], True),
(Optional[str], True),
(int | None, True),

Choose a reason for hiding this comment

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

This makes the tests for supported versions 3.8, and 3.9 fail. We need to work around this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants