Show More
@@ -77,7 +77,9 b' def _should_be_async(cell: str) -> bool:' | |||
|
77 | 77 | """ |
|
78 | 78 | |
|
79 | 79 | try: |
|
80 | ast.parse(cell) | |
|
80 | # we can't limit ourself to ast.parse, as it __accepts__ to parse on | |
|
81 | # 3.7+, but just does not _compile_ | |
|
82 | compile(cell, '<>', 'exec') | |
|
81 | 83 | return False |
|
82 | 84 | except SyntaxError: |
|
83 | 85 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now