Skip to content

Commit

Permalink
Fixed problem detected by SonarLint
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigurd-Borge committed Nov 5, 2024
1 parent 01c98ba commit a0f7302
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ venv/
.vscode
.idea
AntaresWebDesktop/
AntaresSimulator/
2 changes: 1 addition & 1 deletion src/antares/tools/custom_raw_config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _write_line(self, file_path: "SupportsWrite", section_name: str, delimiter:
"""Writes a single line of the provided section to the specified `file_path`."""
value = self._interpolation.before_write(self, section_name, key, value)
if value is not None or not self._allow_no_value: # type:ignore
value = delimiter + value.replace("\n", "\n\t")
value = delimiter + str(value).replace("\n", "\n\t")
else:
value = ""
file_path.write(f"{key}{value}\n")
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ commands =
python scripts/license_checker_and_adder.py --path=tests --action=fix
ruff check --fix src/ tests/ {posargs}
ruff format src/ tests/ {posargs}
mypy {posargs}
dmypy run {posargs}

0 comments on commit a0f7302

Please sign in to comment.