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:
128 and prevp.parent.type in {
138 elif prevp.type == token.DOUBLESTAR:
141 and prevp.parent.type in {
152 ###############################################################################
153 # SECTION BECAUSE SECTIONS
154 ###############################################################################
166 # Comment because comments
168 if t in ALWAYS_NO_SPACE:
170 if t == token.COMMENT:
173 # Another comment because more comments
174 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
176 prev = leaf.prev_sibling
178 prevp = preceding_leaf(p)
180 if not prevp or prevp.type in OPENING_BRACKETS:
181 # Start of the line or a bracketed expression.
182 # More than one line for the comment.
185 if prevp.type == token.EQUAL:
188 and prevp.parent.type in {