Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/7453#discussion_r34945575
--- Diff: python/pyspark/cloudpickle.py ---
@@ -350,7 +350,26 @@ def save_global(self, obj, name=None,
pack=struct.pack):
if new_override:
d['__new__'] = obj.__new__
- self.save_reduce(typ, (obj.__name__, obj.__bases__, d),
obj=obj)
+ self.save(_load_class)
+ self.save_reduce(typ, (obj.__name__, obj.__bases__,
{"__doc__": obj.__doc__}), obj=obj)
+ d.pop('__doc__', None)
+ # handle property and staticmethod
+ dd = {}
+ for k, v in d.items():
+ if isinstance(v, property):
+ k = ('property', k)
+ v = (v.fget, v.fset, v.fdel, v.__doc__)
+ elif isinstance(v, staticmethod) and hasattr(v,
'__func__'):
--- End diff --
I tried with putting `-E` to pylint, it seems even worse, lots of
false-negtive errors.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]