Allow newlines in function definitions to be ignored#37
Allow newlines in function definitions to be ignored#37pferreir wants to merge 1 commit intodjrobstep:masterfrom
Conversation
|
Awesome, thanks so much for this! I'm wondering if it might be slightly cleaner to contain the newline-normalization stuff entirely within the inspection objects? So it would work like: That way there's no need to change the equality logic at all, or propagate the option further than the The downside is it's changing the inspected definitions which conceptually feels mildly wrong. What do you think? |
|
Indeed "mutating" the definitions doesn't seem ideal. And you're right that propagating the option is not ideal either. |
|
Cool cool. After reflecting on it I think multiple definitions of equality is a fraught path to go down.. I think adding a |
13f62b5 to
ebbc2e4
Compare
This is the companion to djrobstep/migra#105. I'm not sure whether this is the best approach, I confess I'm not a fan of
is_equaland the awkward it and__eq__call each other, but I can't think of a better solution.