You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have looked into the Solver class and understand it like this is basically a template class for the actual solver classes. As this class is never intended to be instanciated by itself, I recommend declaring it an Abstract Base Class, this is, inheirit the class from abc.ABC. The current setup confuses code analysis tools to think that calling the solve() method from a Solver object always throws an exception. Also, I would suggest specifying the exceptions raised by Solver when trying to class a non-implemented method as NotImplementedError instead of the plain Exception class.
The text was updated successfully, but these errors were encountered:
I have looked into the
Solver
class and understand it like this is basically a template class for the actual solver classes. As this class is never intended to be instanciated by itself, I recommend declaring it an Abstract Base Class, this is, inheirit the class fromabc.ABC
. The current setup confuses code analysis tools to think that calling thesolve()
method from aSolver
object always throws an exception. Also, I would suggest specifying the exceptions raised bySolver
when trying to class a non-implemented method asNotImplementedError
instead of the plainException
class.The text was updated successfully, but these errors were encountered: