Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't add 'absolute_import' futures indiscriminately #165
I'm looking at the test failures now. Some are a matter of updating the test expectations, but others involve idempotency issues that the blanket 'absolute_import' adds hid previously. I suspect the first pass adds imports (e.g., 'six') where there were none before (thus the 'import' filter doesn't trigger to add the 'absolute import' future on that pass). The second pass, now with an import, triggers the 'import' filter.
While it is good to have idempotency when possible, this is an example of where two filters will interact in a way that requires a second pass to fully realize.
Edit: It appears almost all the errors may be idempotency issues related to
Apr 11, 2018
referenced this pull request
Apr 11, 2018
My argument is that forcing single-pass idempotence by adding
To reiterate, my fix is still idempotent, it just avoids unnecessary out-of-band code changes that cause side-effects whilst trying to side-step the fact that interdependent fixers require an extra internal pass.
I value idempotence - the worst situation is code that never stops mutating, and the second worse is not knowing when it should stop mutating. I'm satisfied that idempotence is still maintained and that this behavior should be stable within the bounds of the tests available, as well as the useful lifetime of this tool.