Some PEP8 rectifications
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
Computing with MO
|
||||
"""
|
||||
|
||||
from ..operator import OPERATORS
|
||||
from .exceptions import ComputeError
|
||||
from .add import add
|
||||
from .minus import minus
|
||||
|
@@ -11,8 +11,7 @@ Adding MO
|
||||
"""
|
||||
|
||||
from ..tree import Tree
|
||||
from ..operator import OPERATORS
|
||||
from ..MO.mo import MO, MOnumber, MOstr
|
||||
from ..MO.mo import MO, MOnumber
|
||||
from ..MO.fraction import MOFraction
|
||||
from .exceptions import AddError
|
||||
from .arithmetic import lcm
|
||||
@@ -206,11 +205,11 @@ def mofraction_mofraction(left, right):
|
||||
|
||||
# TODO: Faire un décorateur pour un enregistrement automatique |dim. mars 11 18:24:32 EAT 2018
|
||||
ADDFUNCTIONS = {
|
||||
(MOnumber, MOnumber): monumber_monumber,
|
||||
(MOnumber, MOFraction): monumber_mofraction,
|
||||
(MOFraction, MOnumber): mofraction_monumber,
|
||||
(MOFraction, MOFraction): mofraction_mofraction,
|
||||
}
|
||||
(MOnumber, MOnumber): monumber_monumber,
|
||||
(MOnumber, MOFraction): monumber_mofraction,
|
||||
(MOFraction, MOnumber): mofraction_monumber,
|
||||
(MOFraction, MOFraction): mofraction_mofraction,
|
||||
}
|
||||
|
||||
# -----------------------------
|
||||
# Reglages pour 'vim'
|
||||
|
@@ -22,6 +22,9 @@ class MinusError(ComputeError):
|
||||
class MultiplyError(ComputeError):
|
||||
pass
|
||||
|
||||
class DivideError(ComputeError):
|
||||
pass
|
||||
|
||||
|
||||
# -----------------------------
|
||||
# Reglages pour 'vim'
|
||||
|
@@ -10,12 +10,9 @@
|
||||
Minus MO: take the opposit
|
||||
"""
|
||||
|
||||
from ..tree import Tree
|
||||
from ..operator import OPERATORS
|
||||
from ..MO.mo import MO, MOnumber, MOstr
|
||||
from ..MO.mo import MO, MOnumber
|
||||
from ..MO.fraction import MOFraction
|
||||
from .exceptions import MinusError
|
||||
from .arithmetic import lcm
|
||||
|
||||
|
||||
def minus(left, right):
|
||||
@@ -92,9 +89,9 @@ def mofraction(right):
|
||||
|
||||
# TODO: Faire un décorateur pour un enregistrement automatique |dim. mars 11 18:24:32 EAT 2018
|
||||
MINUSFUNCTIONS = {
|
||||
MOnumber: monumber,
|
||||
MOFraction: mofraction,
|
||||
}
|
||||
MOnumber: monumber,
|
||||
MOFraction: mofraction,
|
||||
}
|
||||
|
||||
# -----------------------------
|
||||
# Reglages pour 'vim'
|
||||
|
@@ -11,8 +11,7 @@ Multiply MO
|
||||
"""
|
||||
|
||||
from ..tree import Tree
|
||||
from ..operator import OPERATORS
|
||||
from ..MO.mo import MO, MOnumber, MOstr
|
||||
from ..MO.mo import MO, MOnumber
|
||||
from ..MO.fraction import MOFraction
|
||||
from .exceptions import MultiplyError
|
||||
|
||||
@@ -116,10 +115,10 @@ def mofraction_monumber(left, right):
|
||||
|
||||
# TODO: Faire un décorateur pour un enregistrement automatique |dim. mars 11 18:24:32 EAT 2018
|
||||
MULFUNCTIONS = {
|
||||
(MOnumber, MOnumber): monumber_monumber,
|
||||
(MOnumber, MOFraction): monumber_mofraction,
|
||||
(MOFraction, MOnumber): mofraction_monumber,
|
||||
}
|
||||
(MOnumber, MOnumber): monumber_monumber,
|
||||
(MOnumber, MOFraction): monumber_mofraction,
|
||||
(MOFraction, MOnumber): mofraction_monumber,
|
||||
}
|
||||
|
||||
# -----------------------------
|
||||
# Reglages pour 'vim'
|
||||
|
Reference in New Issue
Block a user