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

Make pylint XDG Base Directory Specification compliant #3878

Closed
Saul-Dickson opened this issue Oct 5, 2020 · 3 comments · Fixed by #4661
Closed

Make pylint XDG Base Directory Specification compliant #3878

Saul-Dickson opened this issue Oct 5, 2020 · 3 comments · Fixed by #4661
Labels
Configuration Related to configuration Maintenance Discussion or action around maintaining pylint or the dev workflow Proposal 📨
Milestone

Comments

@Saul-Dickson
Copy link

I have this really annoying .pylint.d directory in my home folder. From what I can tell (I don't do C or C++), this directory is storing data.

The problem with this is, quite simply, that data storage has a designated spot. The $HOME/.local/share/<PROGRAM_NAME> folder. This is a part of the XDG Base Directory Specification. A system that designates the folders for specific things like cached files ($HOME/.cache/<PROGRAM_NAME>), configuration files ($HOME/.config/<PROGRAM_NAME>), and data files ($HOME/.local/share/<PROGRAM_NAME>), among other things. The point is to keep user home directories clean and the user sane.

This should be pretty easy to implement. Simply change the variables/constants for where these files are made and stored to the appropriate directory. Simple as that, even for a large codebase (if it was done right).

@hippo91
Copy link
Contributor

hippo91 commented Oct 10, 2020

@Saul-Dickson thanks for this suggestion. The environment variable PYLINTHOME can be set to the directory of your choice where the pylint's persistent data will be stored. Its default value is ~/.pylint.d or .pylint.d in the current working directory.
Maybe we could change this default value to $HOME/.local/share/pylint. I wonder what it would be for windows system.
@Pierre-Sassoulas @AWhetter what do you think about it?

@AWhetter
Copy link
Contributor

There's a package called "appdirs" (https://github.com/ActiveState/appdirs) that deals with the locations of these directories. Integrating that definitely seems like a good idea. We'll have to think about backwards compatibility unless we're saving this change for a major version release. The configuration system of pylint is in need of a good overhaul, but if we can implement this without needing to make breaking changes then even better!

@blueyed
Copy link
Contributor

blueyed commented Dec 28, 2020

I wonder if it shouldn't use ~/.cache by default, given that the data (currently only stats files) is not crucial, in terms of backups, where you might want to include ~/.local/share in backups by default, but exclude ~/.cache.

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.10.0 milestone Jul 28, 2021
Pierre-Sassoulas added a commit that referenced this issue Jul 28, 2021
Closes #3878

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
@Pierre-Sassoulas Pierre-Sassoulas added Maintenance Discussion or action around maintaining pylint or the dev workflow and removed task labels Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Configuration Related to configuration Maintenance Discussion or action around maintaining pylint or the dev workflow Proposal 📨
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants