Skip to content

Commit

Permalink
Fix error with two blank lines before end statement
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed Jul 1, 2024
1 parent 5583e86 commit ac47ace
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bw_simapro_csv/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def get_key_multiline_values(block: list[tuple], stop_terms: Iterable) -> tuple[
an empty line"""
while block:
block = jump_to_nonempty(block)
if not block:
if not any(data for _, data in block):
return
_, key = block.pop(0)
if len(key) != 1:
Expand Down
2 changes: 1 addition & 1 deletion tests/blocks/test_database_input_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_db_input_params(fixtures_dir):
"amount": 1.0,
"loc": 0.0,
"scale": 0.0,
"line_no": 273,
"line_no": 274,
"negative": False,
"hidden": False,
"original_name": "db_input_param",
Expand Down
2 changes: 1 addition & 1 deletion tests/blocks/test_project_input_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_db_input_params(fixtures_dir):
"loc": 32.0,
"minimum": 10.0,
"maximum": 35.0,
"line_no": 283,
"line_no": 284,
"negative": False,
"hidden": False,
"original_name": "proj_input_param",
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/process.csv
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ input_param;23,4;Uniform;0;13;33;No;this is the parameter commentis this presen
Calculated parameters
calc_param;input_param ^ 2;comment for calc_param


End


Expand Down

0 comments on commit ac47ace

Please sign in to comment.