-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong error in Metric.__iter__ #1536
Comments
Since __iter__ = None in Apparently it's possible to do that since python 3.6: https://docs.python.org/3/whatsnew/3.6.html#other-language-changes
|
🐛 Bug
In the class
Metric
, the__iter__
method is defined as follows:In python's docs, the following note is written about
NotImplementedError
(https://docs.python.org/3/library/exceptions.html#NotImplementedError):In fact, the use cases for
NotImplementedError
are:In PyCharm (and maybe other python code checkers), this leads to a warning for every sub-class of Metric, saying that all abstract methods should be implemented (PyCharm understands a method that raises a
NotImplementedError
as abstract, even if there is no@abstractmethod
decorator on this method).Was there a good reason to define
__iter__
like that? Otherwise, could we remove it?The text was updated successfully, but these errors were encountered: