-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Black cannot parse list unpacking #3977
Comments
Note this is new syntax in Python 3.11, introduced by PEP 646. See python/cpython#31018 for the Python grammar changes; we'll need something similar. |
I cannot reproduce. Black already fully supports PEP 646 as far as I can tell, see https://github.com/psf/black/pull/3071/files/ Are you sure you're using 23.10.1?
|
Also can't repro.
|
Also can't reproduce, so closing. It's possible there's another syntax issue later in the file that makes Black try falling back to a grammar without PEP 646 support, though I can't reproduce that either. |
The error occurs when committing via git:
When I run |
@ThGaskin is the pre-commit hook running a different version/configuration of black? Could you share the full file file or try to isolate the issue and share a minimal snippet where it reproduces? |
Describe the bug
The following snippet blocks git commits:
with error
error: cannot format model_plots/data_ops.py: Cannot parse: 462:30: bin_centres = bin_centres[*sel].flatten()
The text was updated successfully, but these errors were encountered: