Skip to content

Commit 21fb2d8

Browse files
authored
lint again
1 parent fe86423 commit 21fb2d8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/mdio/converters/segy.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,12 @@ def grid_density_qc(grid: Grid, num_traces: int) -> None:
6666
Args:
6767
grid: The grid instance to check.
6868
num_traces: Expected number of traces.
69+
70+
Raises:
71+
GridTraceCountError: When the grid is too sparse.
6972
"""
7073
grid_traces = np.prod(grid.shape[:-1], dtype=np.uint64) # Exclude sample
71-
dims = {name: shape for name, shape in zip(grid.dim_names, grid.shape)}
74+
dims = {k: v for k, v in zip(grid.dim_names, grid.shape)} # noqa: B905
7275

7376
logger.debug(f"Dimensions: {dims}")
7477
logger.debug(f"num_traces = {num_traces}")
@@ -84,7 +87,7 @@ def grid_density_qc(grid: Grid, num_traces: int) -> None:
8487
f"Grid shape: {grid.shape} but SEG-Y tracecount: {num_traces}. "
8588
"This grid is very sparse and most likely user error with indexing."
8689
)
87-
raise ValueError(msg)
90+
raise GridTraceCountError(msg)
8891

8992
# Warning if we have above 50% sparsity.
9093
if grid_traces > 2 * num_traces:

0 commit comments

Comments
 (0)