-
Notifications
You must be signed in to change notification settings - Fork 2.4k
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
maximum recursion depth exceeded while calling a Python object #3340
Comments
Thanks for the report! I believe pre-commit doesn't use wheels, which might explain some of your reproducibility issues (e.g. maybe there's some interaction with mypyc). I can reproduce on main with my editably installed checkout with The stacktrace (visible by using
Edit: earlier version of this comment claimed it reproduced without |
Goes back at least all the way to ESP being added to preview (this issue should probably get an ESP label) |
Describe the bug
When running black using pre-commit against a generated Django migration file, the following error is observed:
To Reproduce
Here is a file that can reproduce the above issue: https://gist.github.com/trumpet2012/057e1e6bc381081e06a2eaf9e22db45a
Install pre-commit: https://pre-commit.com/index.html#installation
Our pre-commit config is:
Then running:
Results in the above error.
Expected behavior
Black should be able to correctly reformat the file.
Environment
Additional context
It works when you run black without the
--preview
flag.Interestingly, it also works running black directly (bypassing pre-commit) even with the
--preview
flag enabled.Also when I was generating the example file above, I was going through and replacing our internal column names and help text with fake data and when I replaced the
help_text=
strings with justLorem ipsum dolores
it also worked correctly. Increasing the length of the help text strings then caused the issue to reappear.The text was updated successfully, but these errors were encountered: