Some PEP8 rectifications

This commit is contained in:
2018-03-13 14:43:48 +03:00
parent e9046c49ff
commit e4efa1028e
14 changed files with 100 additions and 109 deletions

View File

@@ -10,7 +10,6 @@
Computing with MO
"""
from ..operator import OPERATORS
from .exceptions import ComputeError
from .add import add
from .minus import minus

View File

@@ -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'

View File

@@ -22,6 +22,9 @@ class MinusError(ComputeError):
class MultiplyError(ComputeError):
pass
class DivideError(ComputeError):
pass
# -----------------------------
# Reglages pour 'vim'

View File

@@ -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'

View File

@@ -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'