MCPcopy
hub / github.com/psf/black / comments_after

Method comments_after

src/black/lines.py:417–419  ·  view source on GitHub ↗

Generate comments that should appear directly after `leaf`.

(self, leaf: Leaf)

Source from the content-addressed store, hash-verified

415 return True
416
417 def comments_after(self, leaf: Leaf) -> list[Leaf]:
418 """Generate comments that should appear directly after `leaf`."""
419 return self.comments.get(id(leaf), [])
420
421 def remove_trailing_comma(self) -> None:
422 """Remove the trailing comma and moves the comments attached to it."""

Callers 12

enumerate_with_lengthMethod · 0.95
append_leavesFunction · 0.80
bracket_split_build_lineFunction · 0.80
append_commentsFunction · 0.80
standalone_comment_splitFunction · 0.80
hug_power_opFunction · 0.80
do_matchMethod · 0.80
_merge_string_groupMethod · 0.80
do_transformMethod · 0.80
do_transformMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected