From: Richard Si <63936253+ichard26@users.noreply.github.com> Date: Fri, 19 Nov 2021 03:20:44 +0000 (-0500) Subject: Fix mypyc compat issue w/ AST safety check (GH-2628) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/9a73bb86db59de1e12426fec81dcdb7f3bb9be7b?ds=sidebyside;hp=19f6aa8208154de4560ee1e4a3e638e120dcdba5 Fix mypyc compat issue w/ AST safety check (GH-2628) I can't wait for when we drop Python 2 support FWIW :) --- diff --git a/src/black/parsing.py b/src/black/parsing.py index 504e20b..32cfa52 100644 --- a/src/black/parsing.py +++ b/src/black/parsing.py @@ -169,6 +169,7 @@ def stringify_ast( yield f"{' ' * depth}{node.__class__.__name__}(" + type_ignore_classes: Tuple[Type[Any], ...] for field in sorted(node._fields): # noqa: F402 # TypeIgnore will not be present using pypy < 3.8, so need for this if not (_IS_PYPY and sys.version_info < (3, 8)):