Skip to content

Commit

Permalink
Import ABC from collections.abc for Python 3.10 compatibility. (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
tirkarthi committed Mar 22, 2022
1 parent ff06c2b commit a5409ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fklearn/metrics/pd_extractors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import collections
import collections.abc
from datetime import datetime
from itertools import chain, repeat

Expand Down Expand Up @@ -74,7 +74,7 @@ def stability_curve_evaluator_extractor(result, base_extractor):

@curry
def repeat_split_log(split_log, results_len):
if isinstance(split_log, collections.Iterable):
if isinstance(split_log, collections.abc.Iterable):
n_repeat = results_len // len(split_log)
# The logic below makes [1, 2, 3] into [1, 1, 1, 2, 2, 2, 3, 3, 3] for n_repeat=3
return list(chain.from_iterable(zip(*repeat(split_log, n_repeat))))
Expand Down

0 comments on commit a5409ae

Please sign in to comment.