Skip to content

Commit

Permalink
[classes] Doc string for get_yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMStraub committed Mar 21, 2017
1 parent 74fef8f commit 4f52696
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flavio/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ def copy(self):
return copy.deepcopy(self)

def get_yaml(self, *args, **kwargs):
"""Get a YAML string representation of all constraints.
The optional parameter `pname` allows to customize the name of the key
containing the parameter list of each constraint (e.g. 'parameters',
'observables').
"""
return yaml.dump(self.get_yaml_dict(*args, **kwargs))

def get_yaml_dict(self, pname='parameters'):
Expand Down

0 comments on commit 4f52696

Please sign in to comment.