Index: flake8-eyeo/flake8_eyeo.py |
=================================================================== |
--- a/flake8-eyeo/flake8_eyeo.py |
+++ b/flake8-eyeo/flake8_eyeo.py |
@@ -102,7 +102,13 @@ |
continue |
if docstring and i == 0 and isinstance(node.value, ast.Str): |
continue |
- if isinstance(node.value, (ast.Call, ast.Yield)): |
+ |
+ non_literal_expr_nodes = (ast.Call, ast.Yield) |
+ try: |
+ non_literal_expr_nodes += (ast.YieldFrom,) |
Sebastian Noack
2017/11/29 21:51:37
This change prevents and A203 to be (incorrectly)
|
+ except AttributeError: |
+ pass |
+ if isinstance(node.value, non_literal_expr_nodes): |
continue |
self.errors.append((node, 'A203 unused expression')) |