X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/048efa7476bec1b2e7df156f2790f3565ab5c6d8..c2327c83b28aa9ae6e7ea7078f17033c23e34d9c:/black.py diff --git a/black.py b/black.py index 0f966ae..f1b1c30 100644 --- a/black.py +++ b/black.py @@ -2577,6 +2577,9 @@ def convert_one_fmt_off_pair(node: Node) -> bool: continue ignored_nodes = list(generate_ignored_nodes(leaf)) + if not ignored_nodes: + continue + first = ignored_nodes[0] # Can be a container node with the `leaf`. parent = first.parent prefix = first.prefix