Skip to content

Commit

Permalink
Merge pull request #1274 from nschloe/black22
Browse files Browse the repository at this point in the history
new black
  • Loading branch information
nschloe authored Jan 30, 2022
2 parents cd899d1 + b4038b8 commit 582f3fe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 21.12b0
rev: 22.1.0
hooks:
- id: black
language_version: python3
Expand Down
2 changes: 1 addition & 1 deletion src/meshio/wkt/_wkt.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
)
triangle_re = re.compile(triangle_pattern)

tin_pattern = fr"TIN\s*\((?:\s*{triangle_pattern}\s*,?)*\s*\)"
tin_pattern = rf"TIN\s*\((?:\s*{triangle_pattern}\s*,?)*\s*\)"
tin_re = re.compile(tin_pattern)


Expand Down
14 changes: 7 additions & 7 deletions tests/performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def read_write(plot=False):
mesh = generate_triangular_mesh()
print(mesh)
mem_size = mesh.points.nbytes + mesh.cells[0].data.nbytes
mem_size /= 1024.0 ** 2
mem_size /= 1024.0**2
print(f"mem_size: {mem_size:.2f} MB")

formats = {
Expand Down Expand Up @@ -311,20 +311,20 @@ def read_write(plot=False):
name,
elapsed_write[-1],
elapsed_read[-1],
file_sizes[-1] / 1024.0 ** 2,
peak_memory_write[-1] / 1024.0 ** 2,
peak_memory_read[-1] / 1024.0 ** 2,
file_sizes[-1] / 1024.0**2,
peak_memory_write[-1] / 1024.0**2,
peak_memory_read[-1] / 1024.0**2,
)
)

names = list(formats.keys())
# convert to MB
file_sizes = np.array(file_sizes)
file_sizes = file_sizes / 1024.0 ** 2
file_sizes = file_sizes / 1024.0**2
peak_memory_write = np.array(peak_memory_write)
peak_memory_write = peak_memory_write / 1024.0 ** 2
peak_memory_write = peak_memory_write / 1024.0**2
peak_memory_read = np.array(peak_memory_read)
peak_memory_read = peak_memory_read / 1024.0 ** 2
peak_memory_read = peak_memory_read / 1024.0**2

if plot:
plot_speed(names, elapsed_write, elapsed_read)
Expand Down

0 comments on commit 582f3fe

Please sign in to comment.