Skip to content

Commit

Permalink
Remove f-strings that are not using any replacement strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Lubbers authored and ElhMah committed Jan 26, 2024
1 parent e71a05b commit 51cf354
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion geolib/models/dsettlement/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ def check_x_in_vertical(self, point_of_vertical: Point):
check_that_x_in_verticals = True
if not (check_that_x_in_verticals):
raise ValueError(
f"The x-coordinate of point_of_vertical does not correspond to an existing vertical."
"The x-coordinate of point_of_vertical does not correspond to an existing vertical."
)

def get_headlines_for_layers(self):
Expand Down
6 changes: 3 additions & 3 deletions geolib/models/dsheetpiling/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ def _get_validated_lateral_earth_pressure_method(
model.
"""
if not isinstance(self.model, Model):
raise ValueError(f"Model is a string; set model first")
raise ValueError("Model is a string; set model first")
if stage_method is None:
return self.model.method
error = ValueError(
Expand All @@ -932,7 +932,7 @@ def _validate_lateral_earth_pressure_methods_for_single_pile_model(
method_right: LateralEarthPressureMethodStage,
) -> None:
if not isinstance(self.model, Model):
raise ValueError(f"Model is a string; set model first")
raise ValueError("Model is a string; set model first")
if self.model.model == ModelType.SINGLE_PILE:
if method_left != method_right:
raise ValueError(
Expand Down Expand Up @@ -1102,7 +1102,7 @@ def add_load(
elif isinstance(load, UniformLoad):
self.add_uniform_load(load=load, stage_id=stage_id)
else:
raise ValueError(f"This type of load is not yet supported")
raise ValueError("This type of load is not yet supported")

def add_uniform_load(self, stage_id: int, load: UniformLoad) -> None:
self.is_valid_unique_load_names(
Expand Down
6 changes: 3 additions & 3 deletions tests/models/test_dseries_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def test_given_unmatchedpropertyvaluestext_when_parse_text_lines_then_raises_val
):
# 1. Set up test data
text_lines = [["2"], ["4"], ["2"]]
expected_error = f"Expected 4 values for property list_property."
expected_error = "Expected 4 values for property list_property."
parsed_structure = None
# 2. Run and verify
with pytest.raises(ValueError) as e_info:
Expand All @@ -150,7 +150,7 @@ class DummyTreeStructureListFirst(DSeriesTreeStructure):
def test_given_notenoughlistvalues_when_parse_text_lines_then_raises_valueerror(self):
# 1. Set up test data
text_lines = ["2", "4", "2"]
expected_error = f"Expected text line property for single_property."
expected_error = "Expected text line property for single_property."
parsed_structure = None
# 2. Run and verify
with pytest.raises(ValueError) as e_info:
Expand Down Expand Up @@ -188,7 +188,7 @@ def test_given_unmatchedpropertylinestext_when_parse_then_raises_valueerror(self
text_lines = ["2"]
expected_error = (
""
+ f"There should be at least 2"
+ "There should be at least 2"
+ f" fields to correctly initalize object {DummyTreeStructure}"
)
parsed_structure = None
Expand Down

0 comments on commit 51cf354

Please sign in to comment.