Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fcmsilva committed Jun 20, 2024
1 parent a4aa5c4 commit ec6b2d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions resources/toml-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
import sys
import tomllib

# Naive implementation of kebab case to find icon names from lesson areas

def kebab_case(string):
# Naive implementation of kebab case to find icon names from lesson areas
return re.sub(r'[^a-zA-Z0-9]+', '-', string.strip()).lower()


Expand Down Expand Up @@ -73,7 +74,7 @@ def error(msg):
card_icons = os.listdir('common/images/card-header-icons')
preview_icons = os.listdir('common/images/preview-header-icons')

for lesson_area in meta["lesson_areas"]:
for lesson_area in meta['lesson_areas']:
expected_icon_name = f'{kebab_case(lesson_area)}.png'
if expected_icon_name not in card_icons:
error(f'Lesson area {lesson_area} not found in card icons')
Expand Down

0 comments on commit ec6b2d1

Please sign in to comment.