Closed jakkdl closed 2 years ago
The only doc to update here is the changelog, since the readme is deliberately pretty vague about details in order to make releases easier! I'm also happy to leave comments attached to the last line.
I'll likely merge this as-is after some manual testing later today 🎉
🤦♂️ immediately after merging: "I wonder what happens if you had assert a and b, 'some meaningful message'
". Two more test-cases for a quick follow-up PR:
assert (
a # comment on a
and b # comment on b
)
assert a and b, "avoid splitting if there's a message"
I imagine getting the comments associated with the right clauses in the first could be kinda annoying, sorry, but it's better UX!
haha, I thought it was a bit scary when you merged it immediately x) I expected something to be broken, so no worries - will figure it out!
This is becoming a thing, but I'm onto handling
assert ( # before
a # a_comment
# between a&and
and #and_comment
# between and&b
b # b_comment
# after
) # paren_comment
which I think should cover everything possible. Thought about "just" handling simpler cases but turns out they're about as messy, heh.
Fix first task in #22
First PR to this repo, so I assume there's some doc I should update. And very possible my implementation is bad in one way or another.
I wanted to leave the comment on the first assert, or put it on a separate line before the first assert (lmk which one you prefer). Will figure out how to do that unless you're fine with it staying on the line of the last assert.