Skip to content

Commit

Permalink
sq: more comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszachy committed Jun 4, 2024
1 parent 3a8ee40 commit 1194544
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fmf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def lazy_any_search(item, patterns):
elif isinstance(data[key], dict):
for k in list(data[key].keys()):
if lazy_any_search(k, value):
data[key].pop(k, None)
data[key].pop(k)
else:
raise utils.MergeError(
"MergeError: Key '{0}' in {1} (wrong type).".format(
Expand Down
2 changes: 1 addition & 1 deletion fmf/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ def split_pattern_replacement(source):
if source[-1] != delimiter:
raise FormatError("'{0}' has to end with '{1}'.".format(source, delimiter))
except IndexError:
raise FormatError("'{0}' has to start and end with '/'.".format(source))
raise FormatError("'{0}' has to start and end with the same delimiter.".format(source))

try:
pattern, replacement = source[1:-1].split(delimiter)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ class TestSplitPatternReplacement:
";/;", # Not long enough - missing 'REPL;'
";;;", # PATTERN and REPL parts empty
"/a/b/c", # Input after trailing deliminer
"/a/b/c/d", # More parts after trailig delimiter
"/a/b/c/d/", # More than 3 delimiters
"/x;y/", # No REPL part as delimiter is /
"/a/a;" # No trailing delimiter
])
Expand Down

0 comments on commit 1194544

Please sign in to comment.