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
15 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
17 prev = leaf.prev_sibling
19 prevp = preceding_leaf(p)
20 if not prevp or prevp.type in OPENING_BRACKETS:
24 if prevp.type == token.EQUAL:
25 if prevp.parent and prevp.parent.type in {
34 elif prevp.type == token.DOUBLESTAR:
35 if prevp.parent and prevp.parent.type in {
43 ###############################################################################
44 # SECTION BECAUSE SECTIONS
45 ###############################################################################
55 # Comment because comments
57 if t in ALWAYS_NO_SPACE:
59 if t == token.COMMENT:
62 # Another comment because more comments
63 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
65 prev = leaf.prev_sibling
67 prevp = preceding_leaf(p)
69 if not prevp or prevp.type in OPENING_BRACKETS:
70 # Start of the line or a bracketed expression.
71 # More than one line for the comment.
74 if prevp.type == token.EQUAL:
75 if prevp.parent and prevp.parent.type in {
94 p = leaf.parent # trailing comment
97 if t in ALWAYS_NO_SPACE:
99 if t == token.COMMENT: # another trailing comment
102 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
104 prev = leaf.prev_sibling
106 prevp = preceding_leaf(p)
107 if not prevp or prevp.type in OPENING_BRACKETS:
111 if prevp.type == token.EQUAL:
112 if prevp.parent and prevp.parent.type in {
121 elif prevp.type == token.DOUBLESTAR:
122 if prevp.parent and prevp.parent.type in {
132 ###############################################################################
133 # SECTION BECAUSE SECTIONS
134 ###############################################################################
146 # Comment because comments
148 if t in ALWAYS_NO_SPACE:
150 if t == token.COMMENT:
153 # Another comment because more comments
154 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
156 prev = leaf.prev_sibling
158 prevp = preceding_leaf(p)
160 if not prevp or prevp.type in OPENING_BRACKETS:
161 # Start of the line or a bracketed expression.
162 # More than one line for the comment.
165 if prevp.type == token.EQUAL:
166 if prevp.parent and prevp.parent.type in {