Skip to content

Commit

Permalink
ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaasRostock committed Jan 17, 2025
1 parent 7f14935 commit 4386c71
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/dictIO/cli/dict_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def _argparser() -> argparse.ArgumentParser:
"-I",
"--ignore-includes",
action="store_true",
help=("ignore include directives (e.g. #include './SUBDICT').\n" "This suppresses merging of sub-dicts. "),
help=("ignore include directives (e.g. #include './SUBDICT').\nThis suppresses merging of sub-dicts. "),
default=False,
required=False,
)
Expand Down
8 changes: 3 additions & 5 deletions src/dictIO/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ def _parse_tokenized_dict(
logger.warning(
"mis-spelled expression / missing ';' around \""
f"{' '.join([str(key)] + [t[1] for t in data_struct_tokens] + [tokens[token_index + i + 1][1]])}" # noqa: E501
"\""
'"'
)
# dict:
if data_struct_tokens[-1][1] == "}":
Expand All @@ -1013,7 +1013,7 @@ def _parse_tokenized_dict(
logger.error(
"mis-spelled expression / missing ';' around \""
f"{' '.join([str(key)] + [t[1] for t in data_struct_tokens])}"
"\""
'"'
)

# Parse the tokenized data struct, translate it into its type (list or dict),
Expand Down Expand Up @@ -1217,9 +1217,7 @@ def _parse_tokenized_list(
if temp_tokens[index][1] not in ["{", ";", "}"]:
# log error: Missing ';' after key value pair
logger.error(
"mis-spelled expression / missing ';' around \""
f"{' '.join([t[1] for t in temp_tokens])}"
"\""
f"mis-spelled expression / missing ';' around \"{' '.join([t[1] for t in temp_tokens])}\""
)

# Parse the tokenized data struct, translate it into its type (list or dict),
Expand Down
2 changes: 1 addition & 1 deletion src/dictIO/utils/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def relative_path(from_path: Path, to_path: Path) -> Path:
try:
relative_path = to_path.relative_to(from_path)
except ValueError:
msg = "Resolving relative path failed using pathlib.\n" "Next try will use os.path instead of pathlib."
msg = "Resolving relative path failed using pathlib.\nNext try will use os.path instead of pathlib."
logger.debug(msg)
try:
relative_path = Path(os.path.relpath(to_path, from_path))
Expand Down
2 changes: 1 addition & 1 deletion tests/test_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TestNativeFormatter:
"string",
"0.1",
"2",
"+0.1" "+2",
"+0.1+2",
"-0.1",
"-2",
"$keyword",
Expand Down

0 comments on commit 4386c71

Please sign in to comment.