Fix: Black does its job
This commit is contained in:
@@ -26,6 +26,7 @@ def moify(token):
|
||||
except MOError:
|
||||
return token
|
||||
|
||||
|
||||
@coroutine
|
||||
def moify_cor(target):
|
||||
""" Coroutine which try to convert a parsed token into an MO
|
||||
|
@@ -101,7 +101,6 @@ class MO(ABC):
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
|
||||
class Atom(MO):
|
||||
|
||||
""" Base Math Object with only one component.
|
||||
|
@@ -110,6 +110,7 @@ class MOstrPower(Molecule):
|
||||
'monome2'
|
||||
"""
|
||||
return f"monome{self.power}"
|
||||
|
||||
def differentiate(self):
|
||||
""" differentiate a MOstrPower and get a tree
|
||||
|
||||
@@ -121,8 +122,10 @@ class MOstrPower(Molecule):
|
||||
> x^2
|
||||
"""
|
||||
if self._power > 2:
|
||||
return Tree('*', self.power, MOstrPower(self.variable, self._power._value-1))
|
||||
return Tree('*', self.power, MOstr(self.variable))
|
||||
return Tree(
|
||||
"*", self.power, MOstrPower(self.variable, self._power._value - 1)
|
||||
)
|
||||
return Tree("*", self.power, MOstr(self.variable))
|
||||
|
||||
|
||||
class MOMonomial(Molecule):
|
||||
|
Reference in New Issue
Block a user