Skip to content

Commit 0c77f10

Browse files
committed
Merge pull request #118 from asottile/3_3_3
Upstream 3.3.3
2 parents 180f664 + 33ef9ee commit 0c77f10

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

libsass

Submodule libsass updated 90 files

sass.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ def compile_dirname(
203203
for dirpath, _, filenames in os.walk(search_path):
204204
filenames = [
205205
filename for filename in filenames
206-
if filename.endswith(('.scss', '.sass'))
207-
and not filename.startswith('_')
206+
if filename.endswith(('.scss', '.sass')) and
207+
not filename.startswith('_')
208208
]
209209
for filename in filenames:
210210
input_filename = os.path.join(dirpath, filename)

sasstests.py

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def normalize_path(path):
5858
'sources': ['test/a.scss'],
5959
'names': [],
6060
'mappings': (
61-
';AAKA,IAAI,CAAC;EAHH,gBAAgB,EAAE,KAAM,GAQzB;;EALD,IAAI,CAEF,CAAC,'
62-
'CAAC;IACA,KAAK,EAAE,IAAK,GACb'
61+
';AAKA,AAAA,IAAI,CAAC;EAHH,gBAAgB,EAAE,KAAM,GAQzB;;EALD,AAEE,IAFE,'
62+
'CAEF,CAAC,CAAC;IACA,KAAK,EAAE,IAAK,GACb'
6363
),
6464
}
6565

@@ -583,13 +583,13 @@ def test_normalize_manifests(self):
583583
def test_build_one(self):
584584
d = tempfile.mkdtemp()
585585
src_path = os.path.join(d, 'test')
586-
test_source_path = lambda *path: normalize_path(
587-
os.path.join(d, 'test', *path)
588-
)
589-
replace_source_path = lambda s, name: s.replace(
590-
'SOURCE',
591-
test_source_path(name)
592-
)
586+
587+
def test_source_path(*path):
588+
return normalize_path(os.path.join(d, 'test', *path))
589+
590+
def replace_source_path(s, name):
591+
return s.replace('SOURCE', test_source_path(name))
592+
593593
try:
594594
shutil.copytree('test', src_path)
595595
m = Manifest(sass_path='test', css_path='css')
@@ -610,7 +610,8 @@ def test_build_one(self):
610610
'sources': ['../test/b.scss'],
611611
'names': [],
612612
'mappings': (
613-
';AAAA,CAAC,CACC,CAAC,CAAC;EACA,SAAS,EAAE,IAAK,GACjB'
613+
';AAAA,AACE,CADD,CACC,CAAC,CAAC;EACA,SAAS,EAAE,IAAK,'
614+
'GACjB'
614615
),
615616
},
616617
os.path.join(d, 'css', 'b.scss.css.map')
@@ -629,8 +630,9 @@ def test_build_one(self):
629630
'sources': ['../test/d.scss'],
630631
'names': [],
631632
'mappings': (
632-
';;AAKA,IAAI,CAAC;EAHH,gBAAgB,EAAE,KAAM,GAQzB;;EALD,'
633-
'IAAI,CAEF,CAAC,CAAC;IACA,IAAI,EAAE,0BAA2B,GAClC'
633+
';;AAKA,AAAA,IAAI,CAAC;EAHH,gBAAgB,EAAE,KAAM,GAQzB;;'
634+
'EALD,AAEE,IAFE,CAEF,CAAC,CAAC;IACA,IAAI,EAAE,0BAA2B,'
635+
'GAClC'
634636
),
635637
},
636638
os.path.join(d, 'css', 'd.scss.css.map')
@@ -919,7 +921,10 @@ def test_error(self):
919921
class SassFunctionTest(unittest.TestCase):
920922

921923
def test_from_lambda(self):
922-
lambda_ = lambda abc, d: None
924+
# Hack for https://gitlab.com/pycqa/flake8/issues/117
925+
def noop(x):
926+
return x
927+
lambda_ = noop(lambda abc, d: None)
923928
sf = sass.SassFunction.from_lambda('func_name', lambda_)
924929
self.assertEqual('func_name', sf.name)
925930
self.assertEqual(('$abc', '$d'), sf.arguments)

0 commit comments

Comments
 (0)