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:
124 if prevp.type == token.EQUAL:
125 if prevp.parent and prevp.parent.type in {
134 elif prevp.type == token.DOUBLESTAR:
135 if prevp.parent and prevp.parent.type in {
145 ###############################################################################
146 # SECTION BECAUSE SECTIONS
147 ###############################################################################
159 # Comment because comments
161 if t in ALWAYS_NO_SPACE:
163 if t == token.COMMENT:
166 # Another comment because more comments
167 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
169 prev = leaf.prev_sibling
171 prevp = preceding_leaf(p)
173 if not prevp or prevp.type in OPENING_BRACKETS:
174 # Start of the line or a bracketed expression.
175 # More than one line for the comment.
178 if prevp.type == token.EQUAL:
179 if prevp.parent and prevp.parent.type in {