diff --git a/semeio/jobs/overburden_timeshift/ots.py b/semeio/jobs/overburden_timeshift/ots.py index afe302404..c82f0c424 100644 --- a/semeio/jobs/overburden_timeshift/ots.py +++ b/semeio/jobs/overburden_timeshift/ots.py @@ -126,7 +126,6 @@ def ots_run(parameter_file): ) line = "{}, {}, {}" + ", {}" * num_pairs + "\n" with open(parms.vintages_export_file, "w", encoding="utf-8") as f: - for point, (x_index, y_index) in enumerate( product( range(1, surface_horizon.get_nx() + 1), diff --git a/semeio/jobs/overburden_timeshift/ots_vel_surface.py b/semeio/jobs/overburden_timeshift/ots_vel_surface.py index 8a1f3da24..bf95d1f04 100644 --- a/semeio/jobs/overburden_timeshift/ots_vel_surface.py +++ b/semeio/jobs/overburden_timeshift/ots_vel_surface.py @@ -58,7 +58,6 @@ def __len__(self): return len(self.x) def __str__(self): - s = "x: " + str(self.x) s += "\ny: " + str(self.y) s += "\nz: " + str(self.z) diff --git a/semeio/jobs/scripts/fm_stea.py b/semeio/jobs/scripts/fm_stea.py index cb0ce3738..13edbd7cd 100755 --- a/semeio/jobs/scripts/fm_stea.py +++ b/semeio/jobs/scripts/fm_stea.py @@ -19,7 +19,6 @@ def _get_args_parser(): - parser = argparse.ArgumentParser(description=description) parser.add_argument( diff --git a/semeio/jobs/scripts/replace_string.py b/semeio/jobs/scripts/replace_string.py index a1f0db2bd..9acc6a6c9 100644 --- a/semeio/jobs/scripts/replace_string.py +++ b/semeio/jobs/scripts/replace_string.py @@ -23,7 +23,6 @@ def _get_args_parser(): - parser = argparse.ArgumentParser(description=description) parser.add_argument( diff --git a/tests/jobs/correlated_observations_scaling/unit/test_config.py b/tests/jobs/correlated_observations_scaling/unit/test_config.py index c59049559..8f219ad7f 100644 --- a/tests/jobs/correlated_observations_scaling/unit/test_config.py +++ b/tests/jobs/correlated_observations_scaling/unit/test_config.py @@ -78,7 +78,6 @@ def test_expand_input_modification(): ], ) def test_valid_config_setup(valid_config): - schema = _CORRELATED_OBSERVATIONS_SCHEMA config = configsuite.ConfigSuite( valid_config, diff --git a/tests/jobs/correlated_observations_scaling/unit/test_obs_util.py b/tests/jobs/correlated_observations_scaling/unit/test_obs_util.py index 8db3d5d0d..ea689846c 100644 --- a/tests/jobs/correlated_observations_scaling/unit/test_obs_util.py +++ b/tests/jobs/correlated_observations_scaling/unit/test_obs_util.py @@ -129,7 +129,6 @@ def test_failed_wildcard_expansion(config_dict, obs_list, expected_fails, err_ms def test_create_observation_vectors(snake_oil_facade): - valid_config_data = { "CALCULATE_KEYS": {"keys": [{"key": "WPR_DIFF_1"}]}, "UPDATE_KEYS": {"keys": [{"key": "WPR_DIFF_1"}]}, @@ -153,7 +152,6 @@ def test_create_observation_vectors(snake_oil_facade): @pytest.mark.usefixtures("setup_tmpdir") def test_add_observation_vectors(test_data_root): - valid_config_data = {"UPDATE_KEYS": {"keys": [{"key": "WOPR_OP1_108"}]}} # pylint: disable=protected-access diff --git a/tests/jobs/overburden_timeshift/ots_util.py b/tests/jobs/overburden_timeshift/ots_util.py index 8a97b3257..49e928984 100644 --- a/tests/jobs/overburden_timeshift/ots_util.py +++ b/tests/jobs/overburden_timeshift/ots_util.py @@ -92,7 +92,6 @@ def create_segy_file(name, spec, trace=None, il=None, xl=None, cdp_x=None, cdp_y cdp_y = int_val with segyio.create(name, spec) as f: - scalar = 1 trno = 0 for i, i_cdp_x in enumerate(cdp_x): diff --git a/tests/jobs/replace_string/test_integration.py b/tests/jobs/replace_string/test_integration.py index 26f300bf6..bf8bc3deb 100644 --- a/tests/jobs/replace_string/test_integration.py +++ b/tests/jobs/replace_string/test_integration.py @@ -27,7 +27,6 @@ ) def test_replace_string(tmpdir, input_text, replace_from, replace_to, expected): with tmpdir.as_cwd(): - ert_config_fname = "test.ert" Path(ert_config_fname).write_text( ert_config.format(FROM=replace_from, TO=replace_to), encoding="utf-8" diff --git a/tests/jobs/rft/test_gendata_rft.py b/tests/jobs/rft/test_gendata_rft.py index 8dd76399b..fb233bf6a 100644 --- a/tests/jobs/rft/test_gendata_rft.py +++ b/tests/jobs/rft/test_gendata_rft.py @@ -129,7 +129,6 @@ def test_gendata_rft_directory(tmpdir, monkeypatch): @pytest.mark.usefixtures("norne_data") def test_gendata_rft_entry_point_wrong_well_file(tmpdir, monkeypatch): - arguments = [ "script_name", "-e", @@ -150,7 +149,6 @@ def test_gendata_rft_entry_point_wrong_well_file(tmpdir, monkeypatch): @pytest.mark.usefixtures("norne_data") def test_gendata_rft_entry_point(tmpdir, monkeypatch): - arguments = [ "script_name", "-e", @@ -227,7 +225,6 @@ def test_multiple_report_steps(tmpdir, monkeypatch): @pytest.mark.usefixtures("norne_data") def test_gendata_inactive_info_point_not_in_grid(tmpdir, monkeypatch): - with open("B-1AH.txt", "a+", encoding="utf-8") as fh: fh.write("0 1 2 3\n") @@ -257,7 +254,6 @@ def test_gendata_inactive_info_point_not_in_grid(tmpdir, monkeypatch): @pytest.mark.usefixtures("norne_data") def test_gendata_inactive_info_zone_mismatch(tmpdir, monkeypatch): - with open("well_and_time.txt", "w+", encoding="utf-8") as fh: fh.write("B-1AH 2005-12-01 0\n") @@ -291,7 +287,6 @@ def test_gendata_inactive_info_zone_mismatch(tmpdir, monkeypatch): @pytest.mark.usefixtures("norne_data") def test_gendata_inactive_info_not_in_rft(tmpdir, monkeypatch): - with open("well_and_time.txt", "w+", encoding="utf-8") as fh: fh.write("B-1AH 2005-12-01 0\n") @@ -325,7 +320,6 @@ def test_gendata_inactive_info_not_in_rft(tmpdir, monkeypatch): @pytest.mark.usefixtures("norne_data") def test_gendata_inactive_info_zone_missing_value(tmpdir, monkeypatch): - with open("well_and_time.txt", "w+", encoding="utf-8") as fh: fh.write("B-1AH 2005-12-01 0\n") diff --git a/tests/jobs/rft/test_trajectory.py b/tests/jobs/rft/test_trajectory.py index 18ea00ccd..0657ad707 100644 --- a/tests/jobs/rft/test_trajectory.py +++ b/tests/jobs/rft/test_trajectory.py @@ -68,7 +68,6 @@ def test_validate_non_existing_zone(): "ijk, pressure, validation", itertools.product(ijks, pressures, validations) ) def test_is_active(ijk, pressure, validation): - point = TrajectoryPoint(0, 1, 2, 3, "Zone1") point.set_ijk(ijk) point.pressure = pressure @@ -245,6 +244,5 @@ def test_tuple_column_splitter_explicit(): def test_non_existing_file(): - with pytest.raises(IOError, match="Trajectory file non_existing not found!"): Trajectory.load_from_file("non_existing") diff --git a/tests/jobs/rft/test_zonemap.py b/tests/jobs/rft/test_zonemap.py index e84fcffdc..020d29586 100644 --- a/tests/jobs/rft/test_zonemap.py +++ b/tests/jobs/rft/test_zonemap.py @@ -58,7 +58,6 @@ def initdir(tmpdir): @pytest.mark.usefixtures("initdir") def test_load_data(): - for fname in [ "valid_zonemap.txt", "valid_zonemap_with_comments.txt", diff --git a/tests/jobs/test_scale_observations/test_scale_observations.py b/tests/jobs/test_scale_observations/test_scale_observations.py index 75715d02f..6bf8bf154 100644 --- a/tests/jobs/test_scale_observations/test_scale_observations.py +++ b/tests/jobs/test_scale_observations/test_scale_observations.py @@ -18,7 +18,6 @@ def fixture_snake_oil_obs(snake_oil_facade): @pytest.mark.parametrize("index_list", [None, [0, 1, 2, 3]]) def test_scale_history_summary_obs(snake_oil_obs, index_list): - scale_observations(snake_oil_obs, 1.2345, [Config("FOPR", index_list)]) obs_vector = snake_oil_obs["FOPR"] @@ -31,7 +30,6 @@ def test_scale_history_summary_obs(snake_oil_obs, index_list): @pytest.mark.parametrize("index_list", [None, [35]]) def test_scale_summary_obs(snake_oil_obs, index_list): - scale_observations(snake_oil_obs, 1.2345, [Config("WOPR_OP1_36", index_list)]) obs_vector = snake_oil_obs["WOPR_OP1_36"] @@ -41,7 +39,6 @@ def test_scale_summary_obs(snake_oil_obs, index_list): @pytest.mark.parametrize("index_list", [None, [400, 800]]) def test_scale_gen_obs(snake_oil_obs, index_list): - scale_observations(snake_oil_obs, 1.2345, [Config("WPR_DIFF_1", index_list)]) obs_vector = snake_oil_obs["WPR_DIFF_1"]