fix code for py37
This commit is contained in:
parent
9859c110cc
commit
4ebb2b94c2
|
@ -687,12 +687,13 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
expect_docstring
|
||||
and isinstance(item, ast.Expr)
|
||||
and isinstance(item.value, astStr)
|
||||
and isinstance(item.value.value, str)
|
||||
):
|
||||
if sys.version_info >= (3, 8):
|
||||
doc = item.value.value
|
||||
else:
|
||||
doc = item.value.s
|
||||
if not isinstance(doc, str):
|
||||
return
|
||||
if self.is_rewrite_disabled(doc):
|
||||
return
|
||||
expect_docstring = False
|
||||
|
|
Loading…
Reference in New Issue