Skip to content

Commit 03d0431

Browse files
committed
Update precommit checker versions
Also update driven_cavity example in accordance with checks
1 parent 11aba10 commit 03d0431

4 files changed

Lines changed: 14 additions & 16 deletions

File tree

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exclude: configure|\.*.msh|\.*.rng|^h5hut/\.*|^libjudy\.*|^libmba2d\.*|^libmba3d\.*|^libspud\.*|^spatialindex-1.8.0\.*
44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.4.0
6+
rev: v6.0.0
77
hooks:
88
- id: check-ast
99
- id: check-builtin-literals
@@ -19,12 +19,12 @@ repos:
1919
- id: mixed-line-ending
2020
exclude: ref_vtk_hexahedra.vtu
2121
- id: trailing-whitespace
22-
- repo: https://github.com/psf/black
23-
rev: 23.3.0
22+
- repo: https://github.com/psf/black-pre-commit-mirror
23+
rev: 26.5.1
2424
hooks:
2525
- id: black
2626
- repo: https://github.com/PyCQA/isort
27-
rev: 5.12.0
27+
rev: 9.0.0b5
2828
hooks:
2929
- id: isort
3030
args: ["--profile", "black", "--filter-files"]
@@ -33,7 +33,7 @@ repos:
3333
hooks:
3434
- id: pyupgrade
3535
- repo: https://github.com/PyCQA/flake8
36-
rev: 6.1.0
36+
rev: 7.3.0
3737
hooks:
3838
- id: flake8
3939
args: ["--max-line-length", "88", "--extend-ignore", "E203,E722"]

examples/driven_cavity/driven_cavity.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def erturk_u(NN):
160160
)
161161

162162
velocity = u.ProbeData(pts, "Velocity")
163-
(ilen, jlen) = velocity.shape
163+
ilen, jlen = velocity.shape
164164
norm = 0.0
165165
for i in range(ilen):
166166
diff = pts[i][3] - velocity[i][0]
@@ -217,7 +217,7 @@ def erturk_v(NN):
217217
)
218218

219219
velocity = u.ProbeData(pts, "Velocity")
220-
(ilen, jlen) = velocity.shape
220+
ilen, jlen = velocity.shape
221221
norm = 0.0
222222
for i in range(ilen):
223223
diff = pts[i][3] - velocity[i][1]
@@ -269,7 +269,7 @@ def botella_u(NN):
269269
)
270270

271271
velocity = u.ProbeData(pts, "Velocity")
272-
(ilen, jlen) = velocity.shape
272+
ilen, jlen = velocity.shape
273273
norm = 0.0
274274
for i in range(ilen):
275275
diff = pts[i][3] - velocity[i][0]
@@ -320,7 +320,7 @@ def botella_v(NN):
320320
)
321321

322322
velocity = u.ProbeData(pts, "Velocity")
323-
(ilen, jlen) = velocity.shape
323+
ilen, jlen = velocity.shape
324324

325325
norm = 0.0
326326
for i in range(ilen):
@@ -372,7 +372,7 @@ def botella_p1(NN):
372372
)
373373

374374
velocity = u.ProbeData(pts, "Velocity")
375-
(ilen, jlen) = velocity.shape
375+
ilen, jlen = velocity.shape
376376
pressure = u.ProbeData(pts, "Pressure")
377377

378378
pts0 = np.array(
@@ -430,7 +430,7 @@ def botella_p2(NN):
430430
)
431431

432432
velocity = u.ProbeData(pts, "Velocity")
433-
(ilen, jlen) = velocity.shape
433+
ilen, jlen = velocity.shape
434434
pressure = u.ProbeData(pts, "Pressure")
435435

436436
pts0 = np.array(

examples/driven_cavity/generate_mesh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ optparser = OptionParser(
1212
description="""Generate the mesh files for a given resolution.""",
1313
)
1414

15-
(options, argv) = optparser.parse_args()
15+
options, argv = optparser.parse_args()
1616

1717
try:
1818
NN = int(argv[0])

examples/driven_cavity/plot_data

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ import pylab
77

88

99
def usage():
10-
print(
11-
"""plot_data <NN>
10+
print("""plot_data <NN>
1211
13-
<NN> is a space-separated list of the inverse mesh spacing."""
14-
)
12+
<NN> is a space-separated list of the inverse mesh spacing.""")
1513

1614

1715
try:

0 commit comments

Comments
 (0)