desert icon indicating copy to clipboard operation
desert copied to clipboard

`pycli` isn't getting blacked

Open altendky opened this issue 5 years ago • 3 comments

pycli isn't getting blacked because it's not a .py.

  1. Add pycli to the black command in tox.ini
  • Doesn't help when running manually from the command line
  1. Make it .pycli.py.
  • ./pycli can't work on Windows as the shebang only works if you have the .py extension and it is associated with the py launcher.
  1. Get this into the pyproject.toml

Number 1 only helps when calling tox so it seems inferior. Number 3 solves this issue but leaves another unsolved. Number 2 solves this and the directly-runnable-bootstrapper-on-windows issue (that has no ticket).

altendky avatar Jan 25 '20 03:01 altendky

There we go, this works. Needed the / after the ^.

[tool.black]
include = '(\.pyi?|^/pycli)$'

altendky avatar Jan 25 '20 03:01 altendky

If pycli isn't renamed then below should be updated as well. Or, maybe it can just go away? The referenced ticket didn't immediately seem to be about black ignoring it's config when run from a preocmmit.

https://github.com/python-desert/desert/blob/0570e0f50131ec8cbdc218697543e0bb049072d6/.pre-commit-config.yaml#L5-L9

altendky avatar Jan 26 '20 03:01 altendky

Or, maybe it can just go away?

Yeah

python-desert avatar Jan 26 '20 04:01 python-desert