Skip to content

Commit

Permalink
🐛 fix Union
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Oct 13, 2024
1 parent 7cfb8d7 commit e0bddce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nepattern/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def __init__(self, *base: Any):
self.for_equal.append(arg)
alias_content = "|".join([repr(a) for a in self.for_validate] + [repr(a) for a in self.for_equal])
types = [i.origin for i in self.for_validate] + [type(i) for i in self.for_equal]
super().__init__(Union[*types], alias=alias_content) # type: ignore
super().__init__(Union.__getitem__(tuple(types)), alias=alias_content) # type: ignore

def match(self, input_: Any):
if not input_:
Expand Down

0 comments on commit e0bddce

Please sign in to comment.