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.
7 p = leaf.parent # trailing comment
10 if t in ALWAYS_NO_SPACE:
12 if t == token.COMMENT: # another trailing comment
16 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
19 prev = leaf.prev_sibling
21 prevp = preceding_leaf(p)
22 if not prevp or prevp.type in OPENING_BRACKETS:
28 if prevp.type == token.EQUAL:
29 if prevp.parent and prevp.parent.type in {
38 elif prevp.type == token.DOUBLESTAR:
39 if prevp.parent and prevp.parent.type in {
47 ###############################################################################
48 # SECTION BECAUSE SECTIONS
49 ###############################################################################
59 # Comment because comments
61 if t in ALWAYS_NO_SPACE:
63 if t == token.COMMENT:
66 # Another comment because more comments
67 assert p is not None, f'INTERNAL ERROR: hand-made leaf without parent: {leaf!r}'
69 prev = leaf.prev_sibling
71 prevp = preceding_leaf(p)
73 if not prevp or prevp.type in OPENING_BRACKETS:
74 # Start of the line or a bracketed expression.
75 # More than one line for the comment.
78 if prevp.type == token.EQUAL:
79 if prevp.parent and prevp.parent.type in {
98 p = leaf.parent # trailing comment
101 if t in ALWAYS_NO_SPACE:
103 if t == token.COMMENT: # another trailing comment
106 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
108 prev = leaf.prev_sibling
110 prevp = preceding_leaf(p)
111 if not prevp or prevp.type in OPENING_BRACKETS:
115 if prevp.type == token.EQUAL:
118 and prevp.parent.type in {
128 elif prevp.type == token.DOUBLESTAR:
131 and prevp.parent.type in {
142 ###############################################################################
143 # SECTION BECAUSE SECTIONS
144 ###############################################################################
156 # Comment because comments
158 if t in ALWAYS_NO_SPACE:
160 if t == token.COMMENT:
163 # Another comment because more comments
164 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
166 prev = leaf.prev_sibling
168 prevp = preceding_leaf(p)
170 if not prevp or prevp.type in OPENING_BRACKETS:
171 # Start of the line or a bracketed expression.
172 # More than one line for the comment.
175 if prevp.type == token.EQUAL:
178 and prevp.parent.type in {