Instagram / Fixit

Advanced Python linting framework with auto-fixes and hierarchical configuration that makes it easy to write custom in-repo lint rules.
https://fixit.rtfd.io/en/latest/
Other
666 stars 62 forks source link

Make CollectionError pickleable #401

Closed amyreese closed 10 months ago

amyreese commented 10 months ago

Stack from ghstack (oldest at bottom):

CollectionError could not be unpickled because the default Exception.__reduce__ implementation does not include any attributes/values that weren't passed to the superclass constructor, resulting in a failure when unpickling the exception in the parent class because the rule argument wasn't given.

This updates the class to add a custom __reduce__ that fixes the ability to pickle/unpickle the class correctly, fixing the primary issue with exceptions during linting resulting in broken process pools.

Fix #381