@@ -268,7 +268,9 @@ def initialize_options(self):
268268
269269 def finalize_options (self ):
270270 """Validate the command options."""
271- assert bool (self .msc_version ), 'Codicons version is mandatory for this command.'
271+ assert bool (
272+ self .msc_version
273+ ), 'Codicons version is mandatory for this command.'
272274
273275 def __print (self , msg ):
274276 """Shortcut for printing with the setuptools logger."""
@@ -278,15 +280,25 @@ def run(self):
278280 """Run command."""
279281
280282 # Download .json to a temporary path:
281- download_url_json = self .DOWNLOAD_URL_JSON .format (version = self .msc_version )
283+ download_url_json = self .DOWNLOAD_URL_JSON .format (
284+ version = self .msc_version
285+ )
282286 package_json = urlopen (download_url_json )
283287 package_info = json .load (package_json )
284288 package_version = package_info ['version' ]
285- assert self .msc_version == package_version , 'Codicons version does not match with `package.json` info. %s and %s' % (self .msc_version , package_version )
289+ assert self .msc_version == package_version , (
290+ "Codicons version does not match with `package.json` info. %s and %s"
291+ % (
292+ self .msc_version ,
293+ package_version ,
294+ )
295+ )
286296 self .__print ('Will download codicons version: %s' % package_version )
287297
288298 # Download .css:
289- donwload_url_css = self .DOWNLOAD_URL_CSS .format (version = self .msc_version )
299+ donwload_url_css = self .DOWNLOAD_URL_CSS .format (
300+ version = self .msc_version
301+ )
290302 req = urlopen (donwload_url_css )
291303 if req .status != 200 :
292304 raise Exception ('Failed to download CSS Charmap' )
@@ -311,7 +323,9 @@ def run(self):
311323 json .dump (charmap , f , indent = 4 , sort_keys = True )
312324
313325 # Dump a .ttf font file:
314- download_url_ttf = self .DOWNLOAD_URL_TTF .format (version = self .msc_version )
326+ download_url_ttf = self .DOWNLOAD_URL_TTF .format (
327+ version = self .msc_version
328+ )
315329 ttf_path = self .TTF_PATH .format (version = package_version )
316330 with open (ttf_path , 'wb+' ) as ttfFile :
317331 self .__print (
0 commit comments