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

Cache does not get wiped when --skip-magic-trailing-comma changes #2130

Closed
JelleZijlstra opened this issue Apr 25, 2021 · 0 comments · Fixed by #2131
Closed

Cache does not get wiped when --skip-magic-trailing-comma changes #2130

JelleZijlstra opened this issue Apr 25, 2021 · 0 comments · Fixed by #2131
Assignees
Labels
C: configuration CLI and configuration T: bug Something isn't working

Comments

@JelleZijlstra
Copy link
Collaborator

Describe the bug The cache is still used after you change a configuration option.

To Reproduce Steps to reproduce the behavior:

  1. Format some code with Black
  2. Change some formatting flag (e.g., add skip-magic-trailing-comma = true to your pyproject.toml)
  3. Run Black on your code again and see that nothing changes
  4. Figure out where Black stores the cache and rm -rf it
  5. Run Black on your code again and see that it changes formatting

Does this bug also happen on master? Yes

This is because FileMode.get_cache_key doesn't include this flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: configuration CLI and configuration T: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants