Skip to content

Commit cc1f6d7

Browse files
committed
Fix pre-commit
1 parent 1637396 commit cc1f6d7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/mdio/api/create.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ def create_empty( # noqa PLR0913
5050
headers: SEG-Y v1.0 trace headers. Defaults to None.
5151
overwrite: Whether to overwrite the output file if it already exists. Defaults to False.
5252
53+
Returns:
54+
The output MDIO dataset.
55+
5356
Raises:
5457
FileExistsError: If the output location already exists and overwrite is False.
5558
"""
@@ -86,7 +89,7 @@ def create_empty( # noqa PLR0913
8689

8790
# Write the dimension coordinates and trace mask
8891
xr_dataset = xr_dataset[drop_vars_delayed + ["trace_mask"]]
89-
92+
9093
if output_path is not None:
9194
to_mdio(xr_dataset, output_path=output_path, mode="r+", compute=True)
9295

tests/integration/test_z_create_empty.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class TestCreateEmptyMdio:
9191
"""Tests for create_empty_mdio function."""
9292

9393
@classmethod
94-
def _create_empty_mdio(cls, create_headers: bool, output_path: Path, overwrite: bool = True) -> None:
94+
def _create_empty_mdio(cls, create_headers: bool, output_path: Path, overwrite: bool = True) -> xr_Dataset:
9595
"""Create a temporary empty MDIO file for testing."""
9696
# Create the grid with the specified dimensions
9797
dims = [
@@ -104,14 +104,13 @@ def _create_empty_mdio(cls, create_headers: bool, output_path: Path, overwrite:
104104
# The HeaderSpec can be either standard or customized.
105105
headers = get_teapot_segy_spec().trace.header if create_headers else None
106106
# Create an empty MDIO v1 metric post-stack 3D time velocity dataset
107-
xr_dataset = create_empty(
107+
return create_empty(
108108
mdio_template=PostStack3DVelocityTemplate(data_domain="time", is_metric=True),
109109
dimensions=dims,
110110
output_path=output_path,
111111
headers=headers,
112112
overwrite=overwrite,
113113
)
114-
return xr_dataset
115114

116115
@classmethod
117116
def validate_teapod_dataset_metadata(cls, ds: xr_Dataset, is_velocity: bool) -> None:

0 commit comments

Comments
 (0)