diff --git a/stats/dashboard.py b/stats/dashboard.py index 66795a3a31a..d70b939f338 100644 --- a/stats/dashboard.py +++ b/stats/dashboard.py @@ -42,7 +42,12 @@ def add_years(d, years): def all_true_and_not_empty(bool_iterable): - """ For a given list, check that all elements return true and that the list is not empty.""" + """For a given list, check that all elements return true and that the list is not empty. + + Args: + bool_iterable (iterable of bool): An iterable containing values that can be cast to a bool. + + """ # Ensure that the given list is indeed a simple list bool_list = list(bool_iterable) @@ -1039,6 +1044,7 @@ def is_text_in_element(elementName): } def _is_sector_dac(self): + """Determine whether an activity has comprehensive DAC sectors against the validation methodology.""" sector_dac_activity_level = self.element.xpath('sector[@vocabulary="{}" or @vocabulary="{}" or not(@vocabulary)]'.format(self._dac_5_code(), self._dac_3_code())) if self._major_version() != '1': diff --git a/stats/tests/test_comprehensiveness.py b/stats/tests/test_comprehensiveness.py index f8925963417..bb5aa8ece3b 100644 --- a/stats/tests/test_comprehensiveness.py +++ b/stats/tests/test_comprehensiveness.py @@ -49,9 +49,8 @@ def end_planned_date(datestring): Create an activity_stats element with a specified 'end-planned' date. Also sets the current date to 9990-06-01 - Keyword arguments: - datestring -- An ISO date to be used as the 'end-planned' date for the - activity_stats element to be returned. + Args: + datestring (str): An ISO date to be used as the 'end-planned' date for the activity_stats element to be returned. """ activity_stats = MockActivityStats(major_version) activity_stats.today = datetime.date(9990, 6, 1) diff --git a/statsrunner/loop.py b/statsrunner/loop.py index c27d13bab86..81c203f37e9 100644 --- a/statsrunner/loop.py +++ b/statsrunner/loop.py @@ -14,6 +14,8 @@ def call_stats(this_stats, args): Args: this_stats (cls): stats_module that specifies calculations for relevant input, processed by internal methods of process_file(). + + args: Object containing program run options (set by CLI arguments at runtime. See __init__ for more details). """ this_out = {} # For each method within this_stats object check the method is an enabled stat, if it is not enabled continue to next method.