Skip to content

Commit 2ee0d44

Browse files
committed
skip noerror_on_sync_code if python version is too low to parse the code
1 parent 92b16f3 commit 2ee0d44

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/test_flake8_async.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ def visit_AsyncFor(self, node: ast.AsyncFor):
543543
def test_noerror_on_sync_code(test: str, path: Path):
544544
if any(e in test for e in error_codes_ignored_when_checking_transformed_sync_code):
545545
return
546+
check_version(test)
546547
with tokenize.open(path) as f:
547548
source = f.read()
548549
tree = SyncTransformer().visit(ast.parse(source))

0 commit comments

Comments
 (0)