Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modopt/opt/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ def metrics(self, metrics):
raise TypeError(
'Metrics must be a dictionary, not {0}.'.format(type(metrics)),
)
else:
self._metrics = metrics
Comment on lines +155 to +156
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is obviously fine in itself. The reason the CI tests fail is because WPS doesn't like negated conditions. To resolve simply swap the elif and else statements without the not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes @sfarrens , I have done just this in my next PR. We can ideally close this if the other one is merged


def any_convergence_flag(self):
"""Check convergence flag.
Expand Down