Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# exclude auto generated files like configure, *.msh and *.rng files
# and any files from external libraries: h5hut/libjudy/libmba[23]d/libspud and spatialindex
exclude: configure|\.*.msh|\.*.rng|^h5hut/\.*|^libjudy\.*|^libmba2d\.*|^libmba3d\.*|^libspud\.*|^spatialindex-1.8.0\.*
ci:
autofix_prs: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: check-ast
- id: check-builtin-literals
Expand All @@ -19,12 +21,12 @@ repos:
- id: mixed-line-ending
exclude: ref_vtk_hexahedra.vtu
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.3.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.5.1
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 9.0.0b5
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
Expand All @@ -33,7 +35,7 @@ repos:
hooks:
- id: pyupgrade
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.3.0
hooks:
- id: flake8
args: ["--max-line-length", "88", "--extend-ignore", "E203,E722"]
12 changes: 6 additions & 6 deletions examples/driven_cavity/driven_cavity.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def erturk_u(NN):
)

velocity = u.ProbeData(pts, "Velocity")
(ilen, jlen) = velocity.shape
ilen, jlen = velocity.shape
norm = 0.0
for i in range(ilen):
diff = pts[i][3] - velocity[i][0]
Expand Down Expand Up @@ -217,7 +217,7 @@ def erturk_v(NN):
)

velocity = u.ProbeData(pts, "Velocity")
(ilen, jlen) = velocity.shape
ilen, jlen = velocity.shape
norm = 0.0
for i in range(ilen):
diff = pts[i][3] - velocity[i][1]
Expand Down Expand Up @@ -269,7 +269,7 @@ def botella_u(NN):
)

velocity = u.ProbeData(pts, "Velocity")
(ilen, jlen) = velocity.shape
ilen, jlen = velocity.shape
norm = 0.0
for i in range(ilen):
diff = pts[i][3] - velocity[i][0]
Expand Down Expand Up @@ -320,7 +320,7 @@ def botella_v(NN):
)

velocity = u.ProbeData(pts, "Velocity")
(ilen, jlen) = velocity.shape
ilen, jlen = velocity.shape

norm = 0.0
for i in range(ilen):
Expand Down Expand Up @@ -372,7 +372,7 @@ def botella_p1(NN):
)

velocity = u.ProbeData(pts, "Velocity")
(ilen, jlen) = velocity.shape
ilen, jlen = velocity.shape
pressure = u.ProbeData(pts, "Pressure")

pts0 = np.array(
Expand Down Expand Up @@ -430,7 +430,7 @@ def botella_p2(NN):
)

velocity = u.ProbeData(pts, "Velocity")
(ilen, jlen) = velocity.shape
ilen, jlen = velocity.shape
pressure = u.ProbeData(pts, "Pressure")

pts0 = np.array(
Expand Down
2 changes: 1 addition & 1 deletion examples/driven_cavity/generate_mesh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ optparser = OptionParser(
description="""Generate the mesh files for a given resolution.""",
)

(options, argv) = optparser.parse_args()
options, argv = optparser.parse_args()

try:
NN = int(argv[0])
Expand Down
6 changes: 2 additions & 4 deletions examples/driven_cavity/plot_data
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import pylab


def usage():
print(
"""plot_data <NN>
print("""plot_data <NN>

<NN> is a space-separated list of the inverse mesh spacing."""
)
<NN> is a space-separated list of the inverse mesh spacing.""")


try:
Expand Down