"Fossies" - the Fresh Open Source Software Archive

Source code changes of the file "Cheetah/Tools/MondoReport.py" betweencheetah3-3.1.0.tar.gz and cheetah3-3.2.0.tar.gz

About: Cheetah3 is a template engine and code generation tool for e.g. for Web development or Java, SQL, LaTeX, form email ... (written in Python).

MondoReport.py  (cheetah3-3.1.0):MondoReport.py  (cheetah3-3.2.0)
skipping to change at line 97 skipping to change at line 97
"""Always returns a floating-point number. """Always returns a floating-point number.
""" """
lis_len = len(lis) lis_len = len(lis)
if lis_len == 0: if lis_len == 0:
return 0.00 # Avoid ZeroDivisionError (not raised for floats anyway) return 0.00 # Avoid ZeroDivisionError (not raised for floats anyway)
total = float(sum(lis)) total = float(sum(lis))
def median(lis): def median(lis):
lis = sorted(lis[:]) lis = sorted(lis[:])
return lis[int(len(lis)/2)] return lis[int(len(lis)/2)] # noqa: E226,E501 missing whitespace around ope rator
def variance(lis): def variance(lis):
raise NotImplementedError() raise NotImplementedError()
def variance_n(lis): def variance_n(lis):
raise NotImplementedError() raise NotImplementedError()
def standardDeviation(lis): def standardDeviation(lis):
raise NotImplementedError() raise NotImplementedError()
skipping to change at line 307 skipping to change at line 307
try: try:
sequence[end - 1] sequence[end - 1]
except Exception: except Exception:
end = len(sequence) end = len(sequence)
# if end > l: end=l # if end > l: end=l
start = end + 1 - size start = end + 1 - size
if start - 1 < orphan: if start - 1 < orphan:
start = 1 start = 1
else: else:
start = 1 start = 1
end = start1 end = start + size - 1
try: try:
sequence[end1] sequence[end + orphan - 1]
except Exception: except Exception:
end = len(sequence) end = len(sequence)
# if l - end < orphan: end=l # if l - end < orphan: end=l
return start, end, size return start, end, size
class Summary(ValuesGetterMixin): class Summary(ValuesGetterMixin):
"""The summary statistics, that don't depend on the current record. """The summary statistics, that don't depend on the current record.
""" """
def __init__(self, origList): def __init__(self, origList):
ValuesGetterMixin.__init__(self, origList) ValuesGetterMixin.__init__(self, origList)
End of changes. 3 change blocks.
3 lines changed or deleted 3 lines changed or added