Skip to content
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

Read configuration from XDG_CONFIG_HOME #806

Merged
merged 4 commits into from
Feb 23, 2019
Merged

Read configuration from XDG_CONFIG_HOME #806

merged 4 commits into from
Feb 23, 2019

Conversation

r-darwish
Copy link
Contributor

In addition to ~/.isort.cfg, isort will try to read a configuration file from
$XDG_CONFIG_HOME/isort.cfg

@r-darwish
Copy link
Contributor Author

Waiting for #782 in order to use the xdg package.

@jdufresne
Copy link
Collaborator

appdirs may be a suitable alternative to consider. https://github.com/ActiveState/appdirs

It is well established, cross platform (Windows), and supports all current Pythons.

@r-darwish
Copy link
Contributor Author

r-darwish commented Jan 24, 2019

appdirs returns ~/Library/Application Support in macOS instead of $XDG_CONFIG_HOME/isort.cfg. Is that acceptable?

@jdufresne
Copy link
Collaborator

I don't use macOS, but I gather that is the typical spot for configuration files. If so, then yeah, that makes sense to me.

@r-darwish
Copy link
Contributor Author

It's the typical spot for GUI applications. Command line applications such as fish or git still look
for their configuration file in ~/.config in macOS. I'll do this

r-darwish and others added 4 commits January 24, 2019 17:08
In addition to ~/.isort.cfg, isort will try to read a configuration file from
$XDG_CONFIG_HOME/isort.cfg
Attempt to fix current test errors
Fix accidental variable override
@timothycrosley
Copy link
Member

Looks good! Thank you!

@timothycrosley timothycrosley merged commit 61f3cde into PyCQA:develop Feb 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants