55import glob
66import io
77import json
8- import os
98import os .path
109import re
1110import shutil
2120
2221import pysassc
2322import sass
24- from sassutils .builder import Manifest , build_directory
23+ from sassutils .builder import build_directory
24+ from sassutils .builder import Manifest
2525from sassutils .wsgi import SassMiddleware
2626
2727
@@ -424,11 +424,11 @@ def importer_with_srcmap(path):
424424 path ,
425425 'a { color: red; }' ,
426426 json .dumps ({
427- " version" : 3 ,
428- " sources" : [
429- path + " .db" ,
427+ ' version' : 3 ,
428+ ' sources' : [
429+ path + ' .db' ,
430430 ],
431- " mappings" : " ;AAAA,CAAC,CAAC;EAAE,KAAK,EAAE,GAAI,GAAI" ,
431+ ' mappings' : ' ;AAAA,CAAC,CAAC;EAAE,KAAK,EAAE,GAAI,GAAI' ,
432432 }),
433433 ),
434434 )
@@ -448,13 +448,13 @@ def importer(path):
448448
449449 with assert_raises_compile_error (
450450 RegexMatcher (
451- r'^Error: \n'
452- r' Traceback \(most recent call last\):\n'
453- r'.+'
454- r'ValueError: Bad path: hi\n'
455- r' on line 1:9 of stdin\n'
456- r'>> @import "hi";\n'
457- r' --------\^\n' ,
451+ r'^Error: \n'
452+ r' Traceback \(most recent call last\):\n'
453+ r'.+'
454+ r'ValueError: Bad path: hi\n'
455+ r' on line 1:9 of stdin\n'
456+ r'>> @import "hi";\n'
457+ r' --------\^\n' ,
458458 ),
459459 ):
460460 sass .compile (string = '@import "hi";' , importers = ((0 , importer ),))
@@ -465,14 +465,14 @@ def importer(path):
465465
466466 with assert_raises_compile_error (
467467 RegexMatcher (
468- r'^Error: \n'
469- r' Traceback \(most recent call last\):\n'
470- r'.+'
471- r'ValueError: Expected importer result to be a tuple of '
472- r'length \(1, 2, 3\) but got 0: \(\)\n'
473- r' on line 1:9 of stdin\n'
474- r'>> @import "hi";\n'
475- r' --------\^\n' ,
468+ r'^Error: \n'
469+ r' Traceback \(most recent call last\):\n'
470+ r'.+'
471+ r'ValueError: Expected importer result to be a tuple of '
472+ r'length \(1, 2, 3\) but got 0: \(\)\n'
473+ r' on line 1:9 of stdin\n'
474+ r'>> @import "hi";\n'
475+ r' --------\^\n' ,
476476 ),
477477 ):
478478 sass .compile (string = '@import "hi";' , importers = ((0 , importer ),))
@@ -483,14 +483,14 @@ def importer(path):
483483
484484 with assert_raises_compile_error (
485485 RegexMatcher (
486- r'^Error: \n'
487- r' Traceback \(most recent call last\):\n'
488- r'.+'
489- r'ValueError: Expected importer result to be a tuple of '
490- r"length \(1, 2, 3\) but got 4: \('a', 'b', 'c', 'd'\)\n"
491- r' on line 1:9 of stdin\n'
492- r'>> @import "hi";\n'
493- r' --------\^\n' ,
486+ r'^Error: \n'
487+ r' Traceback \(most recent call last\):\n'
488+ r'.+'
489+ r'ValueError: Expected importer result to be a tuple of '
490+ r"length \(1, 2, 3\) but got 4: \('a', 'b', 'c', 'd'\)\n"
491+ r' on line 1:9 of stdin\n'
492+ r'>> @import "hi";\n'
493+ r' --------\^\n' ,
494494 ),
495495 ):
496496 sass .compile (string = '@import "hi";' , importers = ((0 , importer ),))
@@ -1116,7 +1116,7 @@ def test_error(self):
11161116class SassFunctionTest (unittest .TestCase ):
11171117
11181118 def test_from_lambda (self ):
1119- lambda_ = lambda abc , d : None # pragma: no branch # noqa: E731
1119+ def lambda_ ( abc , d ): return None # pragma: no branch # noqa: E731
11201120 sf = sass .SassFunction .from_lambda ('func_name' , lambda_ )
11211121 assert 'func_name' == sf .name
11221122 assert ('$abc' , '$d' ) == sf .arguments
@@ -1378,14 +1378,14 @@ class CustomFunctionsTest(unittest.TestCase):
13781378 def test_raises (self ):
13791379 with assert_raises_compile_error (
13801380 RegexMatcher (
1381- r'^Error: error in C function raises: \n'
1382- r' Traceback \(most recent call last\):\n'
1383- r'.+'
1384- r'AssertionError: foo\n'
1385- r' on line 1:14 of stdin, in function `raises`\n'
1386- r' from line 1:14 of stdin\n'
1387- r'>> a { content: raises\(\); }\n'
1388- r' -------------\^\n$' ,
1381+ r'^Error: error in C function raises: \n'
1382+ r' Traceback \(most recent call last\):\n'
1383+ r'.+'
1384+ r'AssertionError: foo\n'
1385+ r' on line 1:14 of stdin, in function `raises`\n'
1386+ r' from line 1:14 of stdin\n'
1387+ r'>> a { content: raises\(\); }\n'
1388+ r' -------------\^\n$' ,
13891389 ),
13901390 ):
13911391 compile_with_func ('a { content: raises(); }' )
0 commit comments