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.
11 p = leaf.parent # trailing comment
14 if t in ALWAYS_NO_SPACE:
16 if t == token.COMMENT: # another trailing comment
20 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
23 prev = leaf.prev_sibling
25 prevp = preceding_leaf(p)
26 if not prevp or prevp.type in OPENING_BRACKETS:
32 if prevp.type == token.EQUAL:
33 if prevp.parent and prevp.parent.type in {
42 elif prevp.type == token.DOUBLESTAR:
43 if prevp.parent and prevp.parent.type in {
52 ###############################################################################
53 # SECTION BECAUSE SECTIONS
54 ###############################################################################
65 # Comment because comments
67 if t in ALWAYS_NO_SPACE:
69 if t == token.COMMENT:
72 # Another comment because more comments
73 assert p is not None, f'INTERNAL ERROR: hand-made leaf without parent: {leaf!r}'
75 prev = leaf.prev_sibling
77 prevp = preceding_leaf(p)
79 if not prevp or prevp.type in OPENING_BRACKETS:
80 # Start of the line or a bracketed expression.
81 # More than one line for the comment.
84 if prevp.type == token.EQUAL:
85 if prevp.parent and prevp.parent.type in {
108 p = leaf.parent # trailing comment
111 if t in ALWAYS_NO_SPACE:
113 if t == token.COMMENT: # another trailing comment
116 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
118 prev = leaf.prev_sibling
120 prevp = preceding_leaf(p)
121 if not prevp or prevp.type in OPENING_BRACKETS:
125 if prevp.type == token.EQUAL:
126 if prevp.parent and prevp.parent.type in {
135 elif prevp.type == token.DOUBLESTAR:
136 if prevp.parent and prevp.parent.type in {
146 ###############################################################################
147 # SECTION BECAUSE SECTIONS
148 ###############################################################################
160 # Comment because comments
162 if t in ALWAYS_NO_SPACE:
164 if t == token.COMMENT:
167 # Another comment because more comments
168 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
170 prev = leaf.prev_sibling
172 prevp = preceding_leaf(p)
174 if not prevp or prevp.type in OPENING_BRACKETS:
175 # Start of the line or a bracketed expression.
176 # More than one line for the comment.
179 if prevp.type == token.EQUAL:
180 if prevp.parent and prevp.parent.type in {