Skip to content

Commit 3437a38

Browse files
committed
STY: apply ruff autofixes
1 parent 3066dd6 commit 3437a38

90 files changed

Lines changed: 218 additions & 81 deletions

File tree

Some content is hidden

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

doc/source/plot_idefix_bench.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import matplotlib.pyplot as plt
21
import json
32

3+
import matplotlib.pyplot as plt
4+
5+
46
def do_plot(title, bench_file, gpumodels):
57
with open(bench_file, 'r') as f:
68
benches = json.load(f)

pytools/idfx_io.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import numpy as np
44

5-
65
__all__ = ["readIdfxFile"]
76
# Read .idfx files which are created
87
# for debug purposes by DataBlock.DumpToFile(std::string&)

pytools/idfx_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import argparse
22
import os
3+
import re
34
import shutil
45
import subprocess
56
import sys
6-
import re
77

8-
import numpy as np
98
import matplotlib.pyplot as plt
9+
import numpy as np
1010

1111
from .dump_io import readDump
1212

13+
1314
class bcolors:
1415
HEADER = '\033[95m'
1516
OKBLUE = '\033[94m'

pytools/sod.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def solve(left_state, right_state, geometry, t, gamma=1.4, npts=500,
264264

265265
pos_description = ('Head of Rarefaction', 'Foot of Rarefaction',
266266
'Contact Discontinuity', 'Shock')
267-
positions = dict(zip(pos_description, x_positions))
267+
positions = dict(zip(pos_description, x_positions, strict=True))
268268

269269
# create arrays
270270
x, p, rho, u = create_arrays(pl, pr, xl, xr, x_positions,

pytools/vtk_io.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
@author: glesur
55
"""
66

7-
import warnings
8-
import numpy as np
97
import os
108
import re
9+
import warnings
10+
11+
import numpy as np
1112

1213
# restrict what's included with `import *` to public API
1314
__all__ = [

ruff.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ ignore = [
1111
# allow `import *`
1212
"F403", # undefined-local-with-import-star
1313
"F405", # undefined-local-with-import-star-usage
14-
]
14+
]

test/Dust/DustEnergy/python/testidefix.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
66
@author: lesurg
77
"""
8-
import sys
9-
import numpy as np
108
import argparse
9+
import sys
10+
1111
import matplotlib.pyplot as plt
12+
import numpy as np
1213

1314
parser = argparse.ArgumentParser()
1415
parser.add_argument("-noplot",

test/Dust/DustEnergy/testme.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77
import os
88
import sys
9+
910
sys.path.append(os.getenv("IDEFIX_DIR"))
1011

1112
import pytools.idfx_test as tst

test/Dust/DustyShock/python/testidefix.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88

99
import os
1010
import sys
11+
1112
sys.path.append(os.getenv("IDEFIX_DIR"))
12-
from pytools.vtk_io import readVTK
1313
import argparse
14-
import numpy as np
14+
1515
import matplotlib.pyplot as plt
16+
import numpy as np
1617
from scipy.integrate import solve_ivp
1718

19+
from pytools.vtk_io import readVTK
20+
1821
parser = argparse.ArgumentParser()
1922
parser.add_argument("-noplot",
2023
default=False,

test/Dust/DustyShock/testme.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77
import os
88
import sys
9+
910
sys.path.append(os.getenv("IDEFIX_DIR"))
1011

1112
import pytools.idfx_test as tst

0 commit comments

Comments
 (0)