agda-unimath icon indicating copy to clipboard operation
agda-unimath copied to clipboard

Autoformatting for Python files

Open fredrik-bakke opened this issue 1 year ago • 3 comments

A recent update to pre-commit or Python led to breaking changes for the autoformatting functionality for Python files, so I had to disable them in #701. However, such functionality would be useful to have back.

fredrik-bakke avatar Nov 24 '23 14:11 fredrik-bakke

That's concerning, tool updates should not change code style. I suspect that we don't actually have autopep8 configured and we were relying on some default behavior which might have changed recently. Let me see what's up

VojtechStep avatar Nov 24 '23 19:11 VojtechStep

For reference, here are the installed versions on my machine:

frebak@Fredriks-MacBook-Pro ~ % python3 --version
Python 3.11.6
frebak@Fredriks-MacBook-Pro ~ % python --version
Python 3.11.6
frebak@Fredriks-MacBook-Pro ~ % pre-commit --version
pre-commit 3.5.0

fredrik-bakke avatar Nov 26 '23 18:11 fredrik-bakke

I didn't make this entirely clear in the issue body, but the built-in pre-commit hook double-quote-string-fixer also broke for Python files with my update, which suggests to me that this is a breaking change on pre-commit's side and not Python.

fredrik-bakke avatar Nov 26 '23 18:11 fredrik-bakke