From 2e2a38d0baaa56285c9a9808510f3ca641a1b41e Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Sat, 4 Jan 2020 21:06:41 +0100 Subject: [PATCH] AthenaPython: Fix flake8 warnings. xrange -> range --- Control/AthenaPython/python/tests/PyTHistTestsLib.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Control/AthenaPython/python/tests/PyTHistTestsLib.py b/Control/AthenaPython/python/tests/PyTHistTestsLib.py index 8dfff270806..a1daded4870 100644 --- a/Control/AthenaPython/python/tests/PyTHistTestsLib.py +++ b/Control/AthenaPython/python/tests/PyTHistTestsLib.py @@ -132,15 +132,15 @@ class PyHistWriter(PyAthena.Alg): x = math_sin(float(n)) * 52. + 50. hsvc = self.hsvc hsvc['/temp/h1'].Fill(x) - for _ in xrange(2): hsvc['/temp/other/h1a'].Fill(x) - for _ in xrange(3): hsvc['/new/hists/h1'].Fill(x) + for _ in range(2): hsvc['/temp/other/h1a'].Fill(x) + for _ in range(3): hsvc['/new/hists/h1'].Fill(x) _fill = hsvc['/upd/xxx/gauss1d'].Fill - for _ in xrange(1000): _fill(gauss(mu=0.,sigma=15.),1.) + for _ in range(1000): _fill(gauss(mu=0.,sigma=15.),1.) _fill = hsvc['/rec/gauss2d'].Fill - for _ in xrange(1000): _fill(gauss(mu=0.,sigma=15.), + for _ in range(1000): _fill(gauss(mu=0.,sigma=15.), gauss(mu=0.,sigma=15.), 1.) _fill = hsvc['/rec/gauss3d'].Fill - for _ in xrange(1000): _fill(gauss(mu=0.,sigma=15.), + for _ in range(1000): _fill(gauss(mu=0.,sigma=15.), gauss(mu=0.,sigma=15.), gauss(mu=0.,sigma=15.), 1.) @@ -153,7 +153,7 @@ class PyHistWriter(PyAthena.Alg): tr.Branch('branch2', p2, 'point2/I') tr.Branch('branch3', p3, 'point3/I') _tr_fill = tr.Fill - for i in xrange(1000): + for i in range(1000): p1[0] = i p2[0] = i%10 p3[0] = i%7 -- GitLab