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:
116 if prevp.parent and prevp.parent.type in {
125 elif prevp.type == token.DOUBLESTAR:
126 if prevp.parent and prevp.parent.type in {
136 ###############################################################################
137 # SECTION BECAUSE SECTIONS
138 ###############################################################################
150 # Comment because comments
152 if t in ALWAYS_NO_SPACE:
154 if t == token.COMMENT:
157 # Another comment because more comments
158 assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}"
160 prev = leaf.prev_sibling
162 prevp = preceding_leaf(p)
164 if not prevp or prevp.type in OPENING_BRACKETS:
165 # Start of the line or a bracketed expression.
166 # More than one line for the comment.
169 if prevp.type == token.EQUAL:
170 if prevp.parent and prevp.parent.type in {