atom-python-black icon indicating copy to clipboard operation
atom-python-black copied to clipboard

Error when running (Linux Mint 19.3)

Open abixadamj opened this issue 5 years ago • 1 comments

When I run Ctrl+Alt+C in open file, there is an error:


Black failed to reformat 💥 💔 💥

Usage: black [OPTIONS] [SRC]...
Try "black -h" for help.
Error: no such option: -N

In setting I have only default value: black When I have changed this to:black {file}there is other error: Failed to spawn command black {file}. Make sure black {file} is installed and on your PATH

My black version:

adasiek@mint-desktop:~$ black --version
black, version 19.10b0

abixadamj avatar Feb 12 '20 11:02 abixadamj

looks like disabling "skip numeric underscore normalization" fixes it

the line adding "-N" is in python-black/lib/python-black.js : 111

if (atom.config.get("python-black.skipNumericUnderscoreNormalization")) {
      args.push("-N");
    }

My "Path to black executable" is "python -m black"

HugoMcPhee avatar Aug 04 '20 12:08 HugoMcPhee