gh-108455: peg_generator: enable mypy's --warn-unreachable setting and redundant-expr error code (#109160)

This commit is contained in:
Alex Waygood 2023-09-08 22:05:40 +01:00 committed by GitHub
parent 15d659f929
commit 697c9dcf8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 9 deletions

View file

@ -66,6 +66,4 @@ def ast_dump(
if all(cls.__name__ != "AST" for cls in node.__class__.__mro__):
raise TypeError("expected AST, got %r" % node.__class__.__name__)
if indent is not None and not isinstance(indent, str):
indent = " " * indent
return _format(node)[0]