Skip to content
Snippets Groups Projects
Commit 7b00e4fc authored by MoritzThomasHuebner's avatar MoritzThomasHuebner
Browse files

Changed the default argument of _subclass_repr_helper to be None instead of an empty list

parent c1673158
No related branches found
No related tags found
1 merge request!129Resolve "`sample_subset` in `PriorSet` should not have have `list()` as a default argument for `keys`"
Pipeline #26906 passed
......@@ -377,7 +377,7 @@ class Prior(object):
"""
return self._subclass_repr_helper()
def _subclass_repr_helper(self, subclass_args=list()):
def _subclass_repr_helper(self, subclass_args=None):
"""Helps out subclass _repr__ methods by creating a common template
Parameters
......@@ -392,7 +392,8 @@ class Prior(object):
"""
prior_name = self.__class__.__name__
args = ['name', 'latex_label', 'minimum', 'maximum']
args.extend(subclass_args)
if subclass_args is not None:
args.extend(subclass_args)
property_names = [p for p in dir(self.__class__) if isinstance(getattr(self.__class__, p), property)]
dict_with_properties = self.__dict__.copy()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment