Skip to content
Advertisement

Tag: python-black

ImportError: cannot import name ‘_unicodefun’ from ‘click’

When running our lint checks with the Python Black package, an error comes up: ImportError: cannot import name ‘_unicodefun’ from ‘click’ (/Users/robot/.cache/pre-commit/repo3u71ccm2/py_env-python3.9/lib/python3.9/site-packages/click/init.py)` In researching this, I found the following related issues: ImportError: cannot import name ‘_unicodefun’ from ‘click’ #2976 ImportError: cannot import name ‘_unicodefun’ from ‘click’ #6013 How can I solve this problem? Is this a false positive from the

PyCharm: Run `black -S` on region

We are not ready to automatically format the whole source code with black. But from time to time I would like to execute black -S on a region via PyCharm. There is a hint in the docs how to run black (or black -S (what I like)) on the whole file. But … How to run black only on a

Black formatter – Ignore specific multi-line code

I would like to ignore a specific multi-line code by black python formatter. Particularly, this is used for np.array or matrix construction which turned ugly when formatted. Below is the example. I found this issue in black github, but that only works for inline command, which is not what I have here. Is there anything I can do to achieve

Advertisement