]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Fix mypyc compat issue w/ AST safety check (GH-2628)
authorRichard Si <63936253+ichard26@users.noreply.github.com>
Fri, 19 Nov 2021 03:20:44 +0000 (22:20 -0500)
committerGitHub <noreply@github.com>
Fri, 19 Nov 2021 03:20:44 +0000 (22:20 -0500)
I can't wait for when we drop Python 2 support FWIW :)

src/black/parsing.py

index 504e20be0022d890759e2f3f081987b60131e349..32cfa5239f117e00c2ce969baab6ee3118a5b519 100644 (file)
@@ -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)):