]> 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 B011 (#820)
authorHugo <hugovk@users.noreply.github.com>
Thu, 2 May 2019 19:09:49 +0000 (22:09 +0300)
committerZsolt Dollenstein <zsol.zsol@gmail.com>
Thu, 2 May 2019 19:09:49 +0000 (20:09 +0100)
Do not call assert False since python -O removes these calls. Instead callers should raise AssertionError().

black.py

index 0ea9b9ab0c40cac91b7782673f55e978caa21979..234bfb5a39d6bda6c24acfe4b7c33c330c364168 100644 (file)
--- a/black.py
+++ b/black.py
@@ -3146,7 +3146,7 @@ def get_future_imports(node: Node) -> Set[str]:
             elif child.type == syms.import_as_names:
                 yield from get_imports_from_children(child.children)
             else:
-                assert False, "Invalid syntax parsing imports"
+                raise AssertionError("Invalid syntax parsing imports")
 
     for child in node.children:
         if child.type != syms.simple_stmt: