From 147548d3c92376cc84784a2744697ec7dbf45164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Tue, 26 Nov 2024 09:44:02 +0100 Subject: [PATCH] fixup! STY: manual fixes for newly flagged violations of UP031 --- yt/data_objects/construction_data_containers.py | 2 +- yt/frontends/athena/data_structures.py | 3 +-- yt/frontends/enzo/data_structures.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/yt/data_objects/construction_data_containers.py b/yt/data_objects/construction_data_containers.py index 0681b08e582..e80308047d2 100644 --- a/yt/data_objects/construction_data_containers.py +++ b/yt/data_objects/construction_data_containers.py @@ -2612,7 +2612,7 @@ def _export_ply( ) else: v = np.empty(self.vertices.shape[1], dtype=vs[:3]) - line = f"element face {nv/3}\n" + line = f"element face {int(nv/3)}\n" f.write(line.encode("latin-1")) f.write(b"property list uchar int vertex_indices\n") if color_field is not None and sample_type == "face": diff --git a/yt/frontends/athena/data_structures.py b/yt/frontends/athena/data_structures.py index 79683cd9f9c..f72b897277e 100644 --- a/yt/frontends/athena/data_structures.py +++ b/yt/frontends/athena/data_structures.py @@ -297,8 +297,7 @@ def _parse_index(self): gridread["dimensions"][gridread["dimensions"] == 0] = 1 if np.prod(gridread["dimensions"]) != gridread["ncells"]: mylog.error( - f"product of dimensions {np.prod(grid['dimensions'])} " - f"not equal to number of cells {grid['ncells']}", + "product of dimensions %i not equal to number of cells %i", np.prod(gridread["dimensions"]), gridread["ncells"], ) diff --git a/yt/frontends/enzo/data_structures.py b/yt/frontends/enzo/data_structures.py index 6f2d6cd0e07..2c7dcfc27ea 100644 --- a/yt/frontends/enzo/data_structures.py +++ b/yt/frontends/enzo/data_structures.py @@ -574,7 +574,7 @@ def _parse_index(self): self.grids = np.empty(len(grids), dtype="object") for i, grid in enumerate(grids): if (i % 1e4) == 0: - mylog.debug(f"Prepared {i:>7} / {self.num_grids:>7} grids") + mylog.debug("Prepared % 7i / % 7i grids", i, self.num_grids) grid.filename = f"Inline_processor_{self.grid_procs[i, 0]:07}" grid._prepare_grid() grid._setup_dx()