The isort library has a setting that will "force number of from imports to be grid wrapped regardless of line length." Using this option will make it so the users can configure how the imports will wrap when using grid mode. This is particularly useful for when it is desirable to have every import on a unique line (which makes it much easier to identify what has changed in a PR, for example).
Ideally this would follow the isort setting:
[tool.ruff.isort]
force_grid_wrap = 2 # Wrap from imports starting at the 2nd import
When coupled with the multi_line_output = 3 mode, for example, imports that start as this:
from itertools import permutations, combinations
become this:
from itertools import (
combinations,
permutations,
)
The isort library has a setting that will "force number of from imports to be grid wrapped regardless of line length." Using this option will make it so the users can configure how the imports will wrap when using grid mode. This is particularly useful for when it is desirable to have every import on a unique line (which makes it much easier to identify what has changed in a PR, for example).
Ideally this would follow the isort setting:
When coupled with the
multi_line_output = 3
mode, for example, imports that start as this:become this: