Select the reducer depending on the dynamic nature of the class obj.
(obj)
| 1081 | |
| 1082 | |
| 1083 | def _class_reduce(obj): |
| 1084 | """Select the reducer depending on the dynamic nature of the class obj.""" |
| 1085 | if obj is type(None): # noqa |
| 1086 | return type, (None,) |
| 1087 | elif obj is type(Ellipsis): |
| 1088 | return type, (Ellipsis,) |
| 1089 | elif obj is type(NotImplemented): |
| 1090 | return type, (NotImplemented,) |
| 1091 | elif obj in _BUILTIN_TYPE_NAMES: |
| 1092 | return _builtin_type, (_BUILTIN_TYPE_NAMES[obj],) |
| 1093 | elif not _should_pickle_by_reference(obj): |
| 1094 | return _dynamic_class_reduce(obj) |
| 1095 | return NotImplemented |
| 1096 | |
| 1097 | |
| 1098 | def _dict_keys_reduce(obj): |
no test coverage detected