STYLE Reduce merge conflicts with force_single_line
or force_grid_wrap=1
#50274
Labels
Code Style
Code style, linting, code_checks
About 2 years ago, we introduced
force_grid_wrap
to reduce merge conflicts due to imports #39780This helped, but we do better in the case when there's a single import per group.
For example, in #49736 the diff was:
, which caused conflicts when backporting to 1.5.x, because 1.5.x didn't have the
Iterator
importIf the import style had instead been:
then the PR above could have just added the
Generic
andTypeVar
imports, without touching theIterator
import, and the backport wouldn't have had this conflictAs an aside, this would also remove nearly 5,000 lines of code
This is how it would look like: #50275
An alternative would be to have forced
, see #51693
This makes imports a lot longer, but has the same effect of reducing conflicts
The text was updated successfully, but these errors were encountered: