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

[IMP] Store ruff's cache in ~/.cache/ruff #434

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

PabloEForgeFlow
Copy link
Contributor

#425 replaced most linters with ruff based on OCA/oca-addons-repo-template@49b350f, but didn't ignore /.ruff_cache.

@pedrobaeza
Copy link
Member

Shouldn't be such cache on the personal profile instead of each repo?

@PabloEForgeFlow
Copy link
Contributor Author

I think so as well, but for some reason the default path is the root of the current project.

@pedrobaeza
Copy link
Member

I think we should set RUFF_CACHE_DIR in the pre-commit environment somehow. How is this done in OCA?

@PabloEForgeFlow
Copy link
Contributor Author

We could do that by adding cache-dir = "~/.cache/ruff" to .ruff.toml. I simply decided to follow what they did as per OCA/oca-addons-repo-template@49b350f.

@pedrobaeza
Copy link
Member

Thanks for the extra info, but I think it's not a good default, because it also means to spread mini-cache dirs around all your drive, and to not be efficient. Please set such configuration here, and propose it also to OCA.

@PabloEForgeFlow PabloEForgeFlow changed the title [IMP] Add .ruff_cache to .gitignore [IMP] Store ruff's cache in ~/.cache/ruff Dec 7, 2023
@pedrobaeza pedrobaeza merged commit da2eebd into Tecnativa:main Dec 7, 2023
27 checks passed
@pedrobaeza
Copy link
Member

Please do the same on OCA's template.

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.

2 participants