Skip to content

Commit

Permalink
Make this code compatible with Python 3.10.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 473700513
  • Loading branch information
yilei authored and diegolascasas committed Oct 12, 2022
1 parent 3af71dd commit 58fb45d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion side_effects_penalties/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from __future__ import print_function

import collections
from collections import abc
import numpy as np
from six.moves import range

Expand All @@ -36,7 +37,7 @@ def __init__(self, value_function, actions):
Raises:
ValueError: if `actions` agument is not an iterable.
"""
if not isinstance(actions, collections.Iterable):
if not isinstance(actions, abc.Iterable):
raise ValueError('`actions` argument must be an iterable.')

self._value_function = value_function
Expand Down

0 comments on commit 58fb45d

Please sign in to comment.