Skip to content

Add settings-path option support #63

@sobolevn

Description

@sobolevn

There's an awesome setting for the isort that I use quite frequently in my setup: settings-path.
It allows to specify the desired configuration path.

Could I please add a support for this option to this library?
I really miss it, and it won't interfere with nay other options.

That's how I think it should work:

  1. If --no-isort-config is passed, then we ignore all other steps and use the default options
    0.1 We can also raise an exception if both --no-isort-config and --isort-settings-path are passed
    0.2 We can just ignore the --isort-settings-path
  2. If this option is passed - then try to read this file. I have two options in case this file does not exist or can not be red:
    1.1 We can raise an exception. All flake8 check will fail with this exception. This will help to indicate about the problem early
    1.2 Just fallback to the config finding behavior in case this file is missing
  3. If no options are passed we should fallback to the config finding logic

@gforcada What do you think?

I personally prefer explicit exceptions. As they indicate about the problem. And not hiding it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions