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

Autoformatting for Python files #939

Open
fredrik-bakke opened this issue Nov 24, 2023 · 3 comments
Open

Autoformatting for Python files #939

fredrik-bakke opened this issue Nov 24, 2023 · 3 comments
Assignees

Comments

@fredrik-bakke
Copy link
Collaborator

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.

@VojtechStep
Copy link
Collaborator

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 VojtechStep self-assigned this Nov 24, 2023
@fredrik-bakke
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants