You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the great tool! It is really convenient to maintain a consistent code style among contributors. I use the double-string-fixer to keep Python strings in a single-quoted format cooperating with black, which prefers double-quoted strings.
# Python 3.11f'-DPYTHON_INCLUDE_DIR={sysconfig.get_path("platinclude")}'# Python 3.12f'-DPYTHON_INCLUDE_DIR={sysconfig.get_path('platinclude')}'# syntax error in Python 3.11
The pre-commit-hooks are invoked by the Python interpreter which runs pre-commit. When the pre-commit command is installed with Python 3.12, it enables PEP 701 and will introduce syntax errors for Python pre-3.12 versions.
Thanks for the advice. I have pinned the Python version in our CI.
I'm also looking forward to the double-string-fixer can work as expected for a better local development experience. Maybe we can add an extra argument, e.g., --target-version=py311.
Thanks for the great tool! It is really convenient to maintain a consistent code style among contributors. I use the
double-string-fixer
to keep Python strings in a single-quoted format cooperating withblack
, which prefers double-quoted strings.Python 3.12 was just released several days ago. It allows users to write arbitrary nested f-strings without changing the quote styles (PEP 701 – Syntactic formalization of f-strings).
The
pre-commit-hooks
are invoked by the Python interpreter which runspre-commit
. When thepre-commit
command is installed with Python 3.12, it enables PEP 701 and will introduce syntax errors for Python pre-3.12 versions.This maybe a problem for a project that supports multiple Python versions.
The text was updated successfully, but these errors were encountered: