This repository was archived by the owner on Oct 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -600,15 +600,8 @@ def _get_file_arg(key):
600600 'custom_import_extensions must be a list of strings '
601601 'not {}' .format (type (_custom_exts ))
602602 )
603- custom_import_extensions = []
604- for ext in _custom_exts :
605- if isinstance (ext , text_type ):
606- custom_import_extensions .append (ext .encode ('utf-8' ))
607- else :
608- raise TypeError (
609- 'custom_import_extensions must be a list of strings '
610- 'not {}' .format (type (ext ))
611- )
603+ custom_import_extensions = [ext .encode ('utf-8' ) for ext in _custom_exts ]
604+
612605 importers = _validate_importers (kwargs .pop ('importers' , None ))
613606
614607 if 'string' in modes :
Original file line number Diff line number Diff line change @@ -1435,19 +1435,14 @@ def test_import_css(exts, tmpdir):
14351435 assert out == 'body {\n color: green; }\n '
14361436
14371437
1438- @pytest .mark .parametrize ('exts' , [
1439- ['.css' , 3 ],
1440- '.css' ,
1441- [b'.css' ],
1442- ])
1443- def test_import_css_error (exts , tmpdir ):
1438+ def test_import_css_error (tmpdir ):
14441439 tmpdir .join ('other.css' ).write ('body {color: green}' )
14451440 main_scss = tmpdir .join ('main.scss' )
14461441 main_scss .write ("@import 'other';" )
14471442 with pytest .raises (TypeError ):
14481443 sass .compile (
14491444 filename = main_scss .strpath ,
1450- custom_import_extensions = exts ,
1445+ custom_import_extensions = '.css' ,
14511446 )
14521447
14531448
You can’t perform that action at this time.
0 commit comments