-
-
Notifications
You must be signed in to change notification settings - Fork 580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insufficient feedback and documentation for the case custom config files are used, without config options in supported section #1433
Comments
Hi @nolar, Thanks for the detailed bug report! This issue is a bit nuanced, after some investigation I can confirm isort is loading your specified configuration file, it just doesn't see any configuration options to pull. The reason for this, is the blanket So, for your example, if you changed [tool.isort]
line_length = 100
multi_line_output = 0
balanced_wrapping = true
combine_as_imports = true
case_sensitive = true
known_third_party = kopf
filter_files = true
skip_glob = kopf/** Everything should work as expected. I think the actionable items from this ticket, for the isort project are:
Let me know if there are other steps you think the project can / should take. Thanks! ~Timothy |
Indeed! Tried with Though, I decided to stay with Thank you anyway for this hint and fast reaction! This is a nice tool to use! |
…ile is specified without a configuration.
This is now implemented in development, with the warning coming live in 5.6.0 and the documentation now live at https://pycqa.github.io/isort/docs/configuration/config_files/#custom-config-files. Thanks! ~Timothy |
Update: this has just been released to PyPI in 5.6.0 release of isort: https://pycqa.github.io/isort/CHANGELOG/#560-october-7-2020 Thanks! ~Timothy |
TL;DR: Settings file is not used with
--settings
,--settings-file
CLI options, unless it is named.isort.cfg
.Steps to reproduce:
Create these settings files:
.isort.cfg
:.isort-examples.py
:They are supposed to process the source code and examples slightly differently — with the delivered package being treated as a third-party library in examples.
Run as:
Actual behavior:
No globs, no third-party section.
Expected behavior:
The specified file is indeed used, with all its options.
An observation: If you move the examples' config to a directory, e.g.
examples/
, and name it as.isort.cfg
, and run it as:Then it is used as expected. So, the settings directory does work, the settings file does not.
The text was updated successfully, but these errors were encountered: