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:
110 if prevp.type == token.EQUAL:
111 if prevp.parent and prevp.parent.type in {
120 elif prevp.type == token.DOUBLESTAR:
121 if prevp.parent and prevp.parent.type in {
131 ###############################################################################
132 # SECTION BECAUSE SECTIONS
133 ###############################################################################
145 # Comment because comments
147 if t in ALWAYS_NO_SPACE:
149 if t == token.COMMENT:
152 # Another comment because more comments
153 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
155 prev = leaf.prev_sibling
157 prevp = preceding_leaf(p)
159 if not prevp or prevp.type in OPENING_BRACKETS:
160 # Start of the line or a bracketed expression.
161 # More than one line for the comment.
164 if prevp.type == token.EQUAL:
165 if prevp.parent and prevp.parent.type in {