Skip to content

Commit 289e1e5

Browse files
committed
Changed AVAILABLE_ICON_FONTS structure
1 parent 3b8cf67 commit 289e1e5

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

icon_font_to_png/command_line.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def run(arguments):
153153
# Isolated for use in wrapper scripts
154154
def download_icon_font(icon_font, directory):
155155
try:
156-
return AVAILABLE_ICON_FONTS[icon_font](directory)
156+
return AVAILABLE_ICON_FONTS[icon_font]['downloader'](directory)
157157
except KeyError:
158158
raise Exception("We don't support downloading font '{name}'".format(
159159
name=icon_font)

icon_font_to_png/icon_font_downloader.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ def get_latest_version_number(self):
116116

117117
# List of implemented icon font downloader classes
118118
AVAILABLE_ICON_FONTS = {
119-
'font-awesome': FontAwesomeDownloader,
120-
'octicons': OcticonsDownloader
119+
'font-awesome': {
120+
'name': 'Font Awesome',
121+
'downloader': FontAwesomeDownloader,
122+
},
123+
'octicons': {
124+
'name': 'Octicons',
125+
'downloader': OcticonsDownloader,
126+
},
121127
}

requirements/dev.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
pytest
33
tox
44
twine
5-
pypandoc
5+
pypandoc
6+
coverage

0 commit comments

Comments
 (0)