Skip to content

Commit

Permalink
Updated formatting with new ruff version
Browse files Browse the repository at this point in the history
  • Loading branch information
oddvarlia committed Jan 10, 2025
1 parent 148a46c commit f055257
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/fmu/tools/rms/create_rft_ertobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ def check_and_parse_config(config: Dict[str, Any]) -> Dict[str, Any]:
else:
config["loglevel"] = logging.WARNING

assert not (
"input_dframe" not in config and "input_file" not in config
), "Specify either input_file or input_dframe"
assert not ("input_dframe" not in config and "input_file" not in config), (
"Specify either input_file or input_dframe"
)

if "input_dframe" in config and "input_file" in config:
raise ValueError("Do not specify both input_dframe and input_file")
Expand Down Expand Up @@ -137,9 +137,9 @@ def check_and_parse_config(config: Dict[str, Any]) -> Dict[str, Any]:
assert isinstance(config["rft_prefix"], str), "rft_prefix must be a string"

config["trajectory_name"] = config.get("trajectory_name", "Drilled trajectory")
assert isinstance(
config["trajectory_name"], str
), "trajectory_name must be a string"
assert isinstance(config["trajectory_name"], str), (
"trajectory_name must be a string"
)

return config

Expand Down
2 changes: 1 addition & 1 deletion tests/rms/test_generate_petro_jobs_for_field_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def rename_subgrids(xtgeo_grd: xtgeo.Grid) -> None:
nsubgrids = len(list(xtgeo_grd.subgrids.keys()))
subgrid_names = []
for i in range(nsubgrids):
name_of_subgrid = f"Zone{i+1}"
name_of_subgrid = f"Zone{i + 1}"
subgrid_names.append(name_of_subgrid)
xtgeo_grd.rename_subgrids(subgrid_names)

Expand Down
2 changes: 1 addition & 1 deletion tests/rms/test_rename_rms_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def test_fix_standalone_filenames(tmp_path):
assert e["instance_name"] == e["standalonefilename"]
with open(e["path"], "r", encoding="utf-8") as f:
code = f.read().strip()
assert code == f"print(\"{entry.split('.')[0]}\")"
assert code == f'print("{entry.split(".")[0]}")'

unfixed = project.get_inconsistent_entries()
assert len(unfixed) - len(skipped) == 0
Expand Down

0 comments on commit f055257

Please sign in to comment.