From b474188d1ae7c55fdf81e8d5a14566aeda3275fe Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Wed, 16 Oct 2019 15:17:08 +0200 Subject: [PATCH] clean up comments and remove py2 parts --- pylib/data.py | 5 +---- pylib/date.py | 1 - pylib/time_of_day.py | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/pylib/data.py b/pylib/data.py index 84c508c..be9e261 100644 --- a/pylib/data.py +++ b/pylib/data.py @@ -10,7 +10,6 @@ .. moduleauthor:: Daniel Weschke """ -from __future__ import print_function import math import pickle @@ -44,7 +43,6 @@ def read(file_name, x_column, y_column, default=None, verbose=False): y = [] for row in file: fields = re.split(r'\s+', row.strip()) - #print(filds) x.append(float(fields[x_column])) y.append(float(fields[y_column])) file.close() @@ -157,7 +155,6 @@ def seq(start, stop=None, step=1): exponent = max(start_exp, step_exp) # no stop because it is an open bound n = int(math.ceil((stop - start)/float(step))) - #n = int((stop - start)/float(step)) # in py3 math.ceil returns int lst = [] if n > 0: lst = [round(start + step*i, exponent) for i in range(n)] @@ -192,5 +189,5 @@ def get_id(ids, uide): :returns: full id :rtype: str or int """ - # we know it is a unique ending + # take first element, because we know it is a unique ending return [idi for idi in ids if idi.endswith(uide)][0] diff --git a/pylib/date.py b/pylib/date.py index 476ee43..4cf20be 100644 --- a/pylib/date.py +++ b/pylib/date.py @@ -10,7 +10,6 @@ .. moduleauthor:: Daniel Weschke """ -from __future__ import division, print_function, unicode_literals def gaußsche_osterformel(year): """Gaußsche Osterformel. diff --git a/pylib/time_of_day.py b/pylib/time_of_day.py index 53c35ae..c21a41f 100644 --- a/pylib/time_of_day.py +++ b/pylib/time_of_day.py @@ -10,10 +10,8 @@ .. moduleauthor:: Daniel Weschke """ -from __future__ import division, print_function, unicode_literals from time import struct_time, mktime - def in_seconds(time): """If time is `time.struct_time` convert to float seconds.