Skip to content

Commit 396f6ba

Browse files
authored
More pyupgrade (#111)
1 parent 7c84253 commit 396f6ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+44
-151
lines changed

advection/problems/smooth.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import print_function
2-
31
import sys
42
import mesh.patch as patch
53
import numpy

advection/problems/test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import print_function
2-
31
import sys
42
import mesh.patch as patch
53

advection/problems/tophat.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import print_function
2-
31
import sys
42
import mesh.patch as patch
53
from util import msg

advection_fv4/problems/smooth.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import print_function
2-
31
import mesh.fv as fv
42
import numpy
53
from util import msg

advection_nonuniform/problems/slotted.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
import numpy as np
32

43
import mesh.patch as patch

advection_nonuniform/problems/test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import print_function
2-
31
import mesh.patch as patch
42
from util import msg
53

compare.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env python3
22

3-
from __future__ import print_function
43

54
import numpy as np
65
import sys
@@ -55,9 +54,9 @@ def compare(data1, data2, rtol=1.e-12):
5554

5655
if not np.any(d2.v() == 0):
5756
rel_err = np.max(np.abs(d1.v() - d2.v()) / np.abs(d2.v()))
58-
print("{:20s} absolute error = {:10.10g}, relative error = {:10.10g}".format(name, abs_err, rel_err))
57+
print(f"{name:20s} absolute error = {abs_err:10.10g}, relative error = {rel_err:10.10g}")
5958
else:
60-
print("{:20s} absolute error = {:10.10g}".format(name, abs_err))
59+
print(f"{name:20s} absolute error = {abs_err:10.10g}")
6160

6261
if not np.allclose(d1.v(), d2.v(), rtol=rtol):
6362
result = "varerr"

compressible/problems/acoustic_pulse.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import print_function
2-
31
import sys
42
import mesh.fv as fv
53
import numpy as np

compressible/problems/advect.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import print_function
2-
31
import sys
42
import mesh.patch as patch
53
import numpy as np

compressible/problems/bubble.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import print_function
2-
31
import numpy as np
42
import sys
53

0 commit comments

Comments
 (0)