From 1f113a3b29d0b1d43a183e377ddcaa078cd87122 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Wed, 15 Jun 2022 13:48:34 +0100 Subject: [PATCH] refactor: comparison of constants removed. --- pyerrors/input/bdio.py | 6 +++--- pyerrors/input/misc.py | 2 +- pyerrors/input/openQCD.py | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pyerrors/input/bdio.py b/pyerrors/input/bdio.py index f54dfbcd..2d30f3b2 100644 --- a/pyerrors/input/bdio.py +++ b/pyerrors/input/bdio.py @@ -61,7 +61,7 @@ def read_ADerrors(file_path, bdio_path='./libbdio.so', **kwargs): return_list = [] print('Reading of bdio file started') - while 1 > 0: + while True: bdio_seek_record(fbdio) ruinfo = bdio_get_ruinfo(fbdio) @@ -373,7 +373,7 @@ def read_mesons(file_path, bdio_path='./libbdio.so', **kwargs): fbdio = bdio_open(ctypes.c_char_p(b_path), ctypes.c_char_p(b_read), ctypes.c_char_p(b_form)) print('Reading of bdio file started') - while 1 > 0: + while True: bdio_seek_record(fbdio) ruinfo = bdio_get_ruinfo(fbdio) if ruinfo < 0: @@ -582,7 +582,7 @@ def read_dSdm(file_path, bdio_path='./libbdio.so', **kwargs): fbdio = bdio_open(ctypes.c_char_p(b_path), ctypes.c_char_p(b_read), ctypes.c_char_p(b_form)) print('Reading of bdio file started') - while 1 > 0: + while True: bdio_seek_record(fbdio) ruinfo = bdio_get_ruinfo(fbdio) if ruinfo < 0: diff --git a/pyerrors/input/misc.py b/pyerrors/input/misc.py index 6d7b6d50..2e148d90 100644 --- a/pyerrors/input/misc.py +++ b/pyerrors/input/misc.py @@ -93,7 +93,7 @@ def read_pbp(path, prefix, **kwargs): nsrc.append(struct.unpack('i', t)[0]) # body - while 0 < 1: + while True: t = fp.read(4) if len(t) < 4: break diff --git a/pyerrors/input/openQCD.py b/pyerrors/input/openQCD.py index 05e9fdb7..c76c0596 100644 --- a/pyerrors/input/openQCD.py +++ b/pyerrors/input/openQCD.py @@ -150,7 +150,7 @@ def read_rwms(path, prefix, version='2.0', names=None, **kwargs): print('something is wrong!') configlist.append([]) - while 0 < 1: + while True: t = fp.read(4) if len(t) < 4: break @@ -362,7 +362,7 @@ def extract_t0(path, prefix, dtr_read, xmin, spatial_extent, fit_range=5, **kwar Ysl = [] configlist.append([]) - while 0 < 1: + while True: t = fp.read(4) if(len(t) < 4): break @@ -657,7 +657,7 @@ def read_qtop(path, prefix, c, dtr_cnfg=1, version="openQCD", **kwargs): nfl = 1 iobs = 8 * nfl # number of flow observables calculated - while 0 < 1: + while True: t = fp.read(4) if(len(t) < 4): break @@ -682,7 +682,7 @@ def read_qtop(path, prefix, c, dtr_cnfg=1, version="openQCD", **kwargs): t = fp.read(8) eps = struct.unpack('d', t)[0] - while 0 < 1: + while True: t = fp.read(4) if(len(t) < 4): break