Black cannot be installed with python 3.5

Trying to install and run black on a python3.5 build

Any idea how to fix this ?

On the PyPi page for black it says that it requires Python 3.6.0 as the minimum. From the GitHub blame history for black, it looks like its been that way since the initial commit.

If you really want to run it on a python 3.5 build, I think you’d need to make sure a more recent version of Python is installed (install using apt by listing the newer version in the packages section of the yaml) and maybe use pyenv to switch to it for running black.

One thing to think about though, do you really need the code formatter running on every single job in your build matrix? Since the results should be the same each time, it might be better to add a separate “code formatting” job/stage that runs black.