Skip to content

Commit

Permalink
Use type to get class and thus avoid the magic method
Browse files Browse the repository at this point in the history
  • Loading branch information
juhoinkinen committed Aug 30, 2019
1 parent 4ef0b5a commit f52a8bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion annif/backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ 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."""
for source_cls in self.__class__.mro()[:-1]: # omit the object class
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:
Expand Down

0 comments on commit f52a8bc

Please sign in to comment.