Fix an error after refactoring.

Avoid using default values for function arguments that use
shallow copy.
This commit is contained in:
Fangjun Kuang 2021-12-22 15:41:17 +08:00
parent 7f4749a4d6
commit 61915876c5

View File

@ -108,12 +108,15 @@ class Hypothesis:
class HypothesisList(object):
def __init__(self, data: Optional[Dict[str, Hypothesis]] = {}):
def __init__(self, data: Optional[Dict[str, Hypothesis]] = None):
"""
Args:
data:
A dict of Hypotheses. Its key is its `value.key`.
"""
if data is None:
self._data = {}
else:
self._data = data
@property