Hi @timothycrosley, I see that isort has a -sp, --settings-path option. Am I right if I say that it allows users to specify the configuration file path for isort? If yes, then it does not seem to work :confused:. I see that #170 was closed without saying the CLI option was implemented. Was it?
I use it like this: isort --settings-path config/isort.conf --check-only --recursive src, but then the output does not match what I configured in this settings file (files that should be skipped aren't, etc.)
Okay I see what is happening here. Settings path option specifies the directory in which to search for the configuration file, not the file itself.
So I had to rename isort.conf to .isort.cfg, and optionally change the command to isort --settings-path config --check-only --recursive src (optionally because if the given argument exists but is not a directory, isort will dirname it, so it works just the same).
This behavior feels a bit weird to me. Is there a benefit to specifying the directory path (to search the configuration file) instead of the file path directly?
This isn't remotely clear in the option's documentation. @timothycrosley Please clarify the help text for --settings-path. Altenatively, allow us to specify a config file directly (e.g. --config=path/to/config.cfg)
This is fixed in develop and will make it's way out in the 5.0.0 release.
Thanks!
~Timothy
Most helpful comment
This isn't remotely clear in the option's documentation. @timothycrosley Please clarify the help text for
--settings-path. Altenatively, allow us to specify a config file directly (e.g.--config=path/to/config.cfg)