From ddd84c4f505e2e51b0a05c0e9d02e48851a7397d Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Wed, 1 Nov 2017 18:56:44 +0100 Subject: [PATCH] [examples] comments. --- bonobo/examples/environ.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bonobo/examples/environ.py b/bonobo/examples/environ.py index 17d4e36..280d2e1 100644 --- a/bonobo/examples/environ.py +++ b/bonobo/examples/environ.py @@ -1,26 +1,26 @@ +""" +This transformation extracts the environment and prints it, sorted alphabetically, one item per line. + +Used in the bonobo tests around environment management. + +""" import os import bonobo def extract_environ(): + """Yield all the system environment.""" yield from sorted(os.environ.items()) def get_graph(): - """ - This function builds the graph that needs to be executed. - - :return: bonobo.Graph - - """ graph = bonobo.Graph() graph.add_chain(extract_environ, print) return graph -# The __main__ block actually execute the graph. if __name__ == '__main__': parser = bonobo.get_argument_parser() with bonobo.parse_args(parser):