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 {
45 ###############################################################################
46 # SECTION BECAUSE SECTIONS
47 ###############################################################################
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:
114 if prevp.type == token.EQUAL:
115 if prevp.parent and prevp.parent.type in {
124 elif prevp.type == token.DOUBLESTAR:
125 if prevp.parent and prevp.parent.type in {
135 ###############################################################################
136 # SECTION BECAUSE SECTIONS
137 ###############################################################################
147 # 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 {