Skip to content

Commit

Permalink
Refine debug message and docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
juhoinkinen committed Aug 30, 2019
1 parent f52a8bc commit f8825ed
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions annif/backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ def __init__(self, backend_id, params, datadir):

def fill_params_with_defaults(self):
"""Set the parameters that are not provided in the projects config file
with default values defined in the backend class and its bases."""
with default values defined in the backend class and its parents."""
for source_cls in type(self).mro()[:-1]: # omit the object class
for default_param, default_value in \
source_cls.DEFAULT_PARAMS.items():
if default_param not in self.params:
self.debug(
"no value set for parameter {}, "
"using default value {} from {}"
"parameter {} not set, using default value {} from {}"
.format(default_param, default_value,
source_cls.__name__))
self.params[default_param] = str(default_value)
Expand Down

0 comments on commit f8825ed

Please sign in to comment.