isort
isort copied to clipboard
files configuration option missing from config file(s)
Is there a reason for not supporting the files option in a config file (for example pyproject.toml)?
For me it would be useful to specify the files/directories in a pyproject.toml file and when I call isort, the files specified in the files option would get sorted without specifying them on the command line.
Hi! I hope you're doing well. If you're still looking for a solution to your use case, I wanted to suggest this option: https://pycqa.github.io/isort/docs/configuration/options.html#src-paths. Let me know if it's not what you are looking for :)
Hi! I hope you're doing well. If you're still looking for a solution to your use case, I wanted to suggest this option: https://pycqa.github.io/isort/docs/configuration/options.html#src-paths. Let me know if it's not what you are looking for :)
If I understand the documentation correctly your suggested src-paths option allows to specify a source path (
modules within src paths have their imports automatically categorized as first_party (link)
). So this option modifies how modules within src-paths have their imports sorted. This is not what I am looking for. I want to specify
One or more Python source files that need their imports sorted (link)
in a config file. The documentation says that
Python & Config File Name: Not Supported
for this option.
So my question is still remains: Why is it not supported and will it be upported in the future?