Select the reducer depending on the dynamic nature of the class obj.
(obj)
| 1067 | |
| 1068 | |
| 1069 | def _class_reduce(obj): |
| 1070 | """Select the reducer depending on the dynamic nature of the class obj.""" |
| 1071 | if obj is type(None): # noqa |
| 1072 | return type, (None,) |
| 1073 | elif obj is type(Ellipsis): |
| 1074 | return type, (Ellipsis,) |
| 1075 | elif obj is type(NotImplemented): |
| 1076 | return type, (NotImplemented,) |
| 1077 | elif obj in _BUILTIN_TYPE_NAMES: |
| 1078 | return _builtin_type, (_BUILTIN_TYPE_NAMES[obj],) |
| 1079 | elif not _should_pickle_by_reference(obj): |
| 1080 | return _dynamic_class_reduce(obj) |
| 1081 | return NotImplemented |
| 1082 | |
| 1083 | |
| 1084 | def _dict_keys_reduce(obj): |
no test coverage detected
searching dependent graphs…