Closed memst closed 3 years ago
@memst Would it be easier to just use isort --profile black
and remove all other settings?
Removing all of the config could be a good idea. The only option that currently does something for the repository and isn't included in --profile black
is order_by_type
order_by_type: If set to true - isort will create separate sections within "from" imports for CONSTANTS, Classes, and modules/functions. (reference)
Currently false
:
from typing import Any, cast, Dict, List, Tuple, Union
Black (also default) true
:
from typing import Any, Dict, List, Tuple, Union, cast
The option can be added through commandline (--dt
= --dont-order-by-type
):
isort --profile black --dt h11 bench examples fuzz
Other settings that would change, but don't impact the current code:
combine_as_imports=True
no_lines_before=LOCALFOLDER
I think you also need to update the tox isort command.
Thanks
Isort 5.0.0 has been released over a year ago and many options have been deprecated as they are now the default behaviour.
Current command for isort in
CONTRIBUTING.md
causes an error:The PR removes all arguments that are unnecessary in the current version.
If support for the old versoin of isort is still needed, a compromise can be reached by using the command:
In that case the old version will work but skip the
__init__.py
file, and the new version will work but give deprecation warnings.