@@ -103,6 +103,7 @@ def __init__(
103103 auto_data = False , timid = None , branch = None , config_file = True ,
104104 source = None , source_pkgs = None , omit = None , include = None , debug = None ,
105105 concurrency = None , check_preimported = False , context = None ,
106+ messages = False ,
106107 ): # pylint: disable=too-many-arguments
107108 """
108109 Many of these arguments duplicate and override values that can be
@@ -173,6 +174,9 @@ def __init__(
173174 `context` is a string to use as the :ref:`static context
174175 <static_contexts>` label for collected data.
175176
177+ If `messages` is true, some messages will be printed to stdout
178+ indicating what is happening.
179+
176180 .. versionadded:: 4.0
177181 The `concurrency` parameter.
178182
@@ -185,6 +189,9 @@ def __init__(
185189 .. versionadded:: 5.3
186190 The `source_pkgs` parameter.
187191
192+ .. versionadded:: 6.0
193+ The `messages` parameter.
194+
188195 """
189196 # data_file=None means no disk file at all. data_file missing means
190197 # use the value from the config file.
@@ -205,6 +212,7 @@ def __init__(
205212 self ._warn_unimported_source = True
206213 self ._warn_preimported_source = check_preimported
207214 self ._no_warn_slugs = None
215+ self ._messages = messages
208216
209217 # A record of all the warnings that have been issued.
210218 self ._warnings = []
@@ -372,6 +380,11 @@ def _warn(self, msg, slug=None, once=False):
372380 if once :
373381 self ._no_warn_slugs .append (slug )
374382
383+ def _message (self , msg ):
384+ """Write a message to the user, if configured to do so."""
385+ if self ._messages :
386+ print (msg )
387+
375388 def get_option (self , option_name ):
376389 """Get an option from the configuration.
377390
@@ -969,7 +982,8 @@ def html_report(
969982 html_skip_empty = skip_empty , precision = precision ,
970983 ):
971984 reporter = HtmlReporter (self )
972- return reporter .report (morfs )
985+ ret = reporter .report (morfs )
986+ return ret
973987
974988 def xml_report (
975989 self , morfs = None , outfile = None , ignore_errors = None ,
0 commit comments