Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix __parameters__ access in gen._generate_mapping
There are Generic types in the typing modules from which you can inherit in your own classes which do not have an __parameters__ attribute, such classes are now ignored making gen._generate_mapping effectively a no-op in case the class do not have an __parameters__ attribute. As https://github.com/ilevkivskyi/typing_inspect/blob/8f6aa2075ba448ab322def454137e7c59b9b302d/typing_inspect.py#L405 is showing there are also cases where __parameters__ could be None, so I test for both cases, that it is None or that it does not exist. See Also: python-attrs#217
- Loading branch information