diff --git a/mypy/fastparse2.py b/mypy/fastparse2.py index a66811e5670e5..637cfd2ac5243 100644 --- a/mypy/fastparse2.py +++ b/mypy/fastparse2.py @@ -298,7 +298,7 @@ def visit_FunctionDef(self, n: ast27.FunctionDef) -> Statement: # hooks if (not any(arg_types) and return_type is None and hooks.docstring_parser): - doc = cast(bytes, ast27.get_docstring(n, clean=False)) + doc = ast27.get_docstring(n, clean=False) if doc: doc = doc.decode('unicode_escape') types = parse_docstring(doc, arg_names, n.lineno)