Skip to content

Commit b2a2403

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c25e273 commit b2a2403

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

src/coffea/processor/executor.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -501,13 +501,28 @@ def __call__(
501501
0,
502502
)
503503

504+
504505
# this class changes the default pickler of ProcessPoolExecutor to the default cloudpickle.Pickler
505506
class _CloudPickleProcessPoolExecutor(concurrent.futures.ProcessPoolExecutor):
506-
def __init__(self, max_workers=None, mp_context=None, initializer=None, initargs=(), max_tasks_per_child=None):
507+
def __init__(
508+
self,
509+
max_workers=None,
510+
mp_context=None,
511+
initializer=None,
512+
initargs=(),
513+
max_tasks_per_child=None,
514+
):
507515
if mp_context is None:
508516
mp_context = multiprocessing.get_context()
509-
mp_context.reducer = cloudpickle.Pickler()
510-
super().__init__(max_workers=max_workers, mp_context=mp_context, initializer=initializer, initargs=initargs, max_tasks_per_child=max_tasks_per_child)
517+
mp_context.reducer = cloudpickle.Pickler()
518+
super().__init__(
519+
max_workers=max_workers,
520+
mp_context=mp_context,
521+
initializer=initializer,
522+
initargs=initargs,
523+
max_tasks_per_child=max_tasks_per_child,
524+
)
525+
511526

512527
@dataclass
513528
class FuturesExecutor(ExecutorBase):

0 commit comments

Comments
 (0)