Skip to content

Black cannot parse list unpacking#3977

@ThGaskin

Description

@ThGaskin

Describe the bug

The following snippet blocks git commits:

# Get the counts and the bin centrescounts, bin_centres=np.take(res, 0, axis=axis), np.take(res, 1, axis=axis) sel= [0] *len(np.shape(bin_centres)) sel[axis] =Nonebin_centres=bin_centres[*sel].flatten() # <---- Error!

with error

error: cannot format model_plots/data_ops.py: Cannot parse: 462:30: bin_centres = bin_centres[*sel].flatten()
  • Black's version: black==23.10.1
  • OS and Python version:macOS Ventura 13.4.1, Python 3.11.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: parserHow we parse code. Or fail to parse it.T: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions