In order to resolve the issue - Support of pipe symbol for Union operation. Python3.10 uses base type as types.UnionTypes. So therefore added a case for that (If the base type is types.UnionTypes then perform validation). Hence supporting Union as X | Y.
Testing performed
Testing performed on Mac OS 13.3.1 and Python 3.10.7
Additional context
Add any other context about your contribution here.
Issue number of the reported bug or feature request: Issue #80
Describe your changes This PR is based on the PR https://github.com/bloomberg/attrs-strict/pull/102 because of permission issues.
In order to resolve the issue - Support of pipe symbol for Union operation. Python3.10 uses base type as types.UnionTypes. So therefore added a case for that (If the base type is types.UnionTypes then perform validation). Hence supporting Union as X | Y.
Testing performed Testing performed on Mac OS 13.3.1 and Python 3.10.7
Additional context Add any other context about your contribution here.