Total Complexity | 1 |
Total Lines | 11 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import typing |
||
2 | |||
3 | |||
4 | def is_from_typing(cls: type) -> bool: |
||
5 | """ |
||
6 | Return True if the given class is from the typing module. |
||
7 | :param cls: a type. |
||
8 | :return: True if cls is from typing. |
||
9 | """ |
||
10 | return cls.__module__ == typing.__name__ |
||
11 |