@@ -341,9 +341,8 @@ def convert_one_fmt_off_pair(
341341 for leaf in node .leaves ():
342342 # Skip STANDALONE_COMMENT nodes that were created by fmt:off/on/skip processing
343343 # to avoid reprocessing them in subsequent iterations
344- if (
345- leaf .type == STANDALONE_COMMENT
346- and hasattr (leaf , "fmt_pass_converted_first_leaf" )
344+ if leaf .type == STANDALONE_COMMENT and hasattr (
345+ leaf , "fmt_pass_converted_first_leaf"
347346 ):
348347 continue
349348
@@ -423,8 +422,11 @@ def _handle_regular_fmt_block(
423422 node_str += "\n "
424423 parts .append (node_str )
425424 elif isinstance (node , Node ):
426- # For nodes that might contain STANDALONE_COMMENT leaves, we need custom stringify
427- has_standalone = any (leaf .type == STANDALONE_COMMENT for leaf in node .leaves ())
425+ # For nodes that might contain STANDALONE_COMMENT leaves,
426+ # we need custom stringify
427+ has_standalone = any (
428+ leaf .type == STANDALONE_COMMENT for leaf in node .leaves ()
429+ )
428430 if has_standalone :
429431 # Stringify node with STANDALONE_COMMENT leaves having trailing newlines
430432 def stringify_node (n : LN ) -> str :
@@ -691,7 +693,8 @@ def _generate_ignored_nodes_from_fmt_skip(
691693 next_node = leaf_nodes [- 1 ] if leaf_nodes else current_node
692694
693695 # Detect infinite loop - if we've seen this node before, stop
694- # This can happen when STANDALONE_COMMENT nodes are inserted during processing
696+ # This can happen when STANDALONE_COMMENT nodes are inserted
697+ # during processing
695698 if id (next_node ) in seen_nodes :
696699 break
697700
0 commit comments