Skip to content

Commit 33ef9ee

Browse files
committed
Fix flake8
1 parent 853484c commit 33ef9ee

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

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: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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')
@@ -921,7 +921,10 @@ def test_error(self):
921921
class SassFunctionTest(unittest.TestCase):
922922

923923
def test_from_lambda(self):
924-
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)
925928
sf = sass.SassFunction.from_lambda('func_name', lambda_)
926929
self.assertEqual('func_name', sf.name)
927930
self.assertEqual(('$abc', '$d'), sf.arguments)

0 commit comments

Comments
 (0)