Skip to content

Commit

Permalink
Merge pull request #20 from Athemis/fix-numerical-watermarks
Browse files Browse the repository at this point in the history
Fix numerical watermarks
  • Loading branch information
HenningTimm authored Nov 19, 2024
2 parents 1c79521 + 570d661 commit 22723e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yml2block/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,9 @@ def no_trailing_spaces(list_item, tsv_keyword, level=Level.ERROR):

for entry in entries_to_check[tsv_keyword]:
try:
value = list_item[entry].value
# Ensure 'value' is a string, as re.search requires
# string input, not a numerical type like int.
value = str(list_item[entry].value)
except KeyError:
# This case occurs, when a typo in one of the required
# keywords is present. They can safely be skipped here,
Expand Down

0 comments on commit 22723e6

Please sign in to comment.