python-desert / desert

Deserialize to objects while staying DRY
https://desert.readthedocs.io
MIT License
158 stars 10 forks source link

`pycli` isn't getting blacked #51

Open altendky opened 4 years ago

altendky commented 4 years ago

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
  2. 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.
  3. 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 commented 4 years ago

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

[tool.black]
include = '(\.pyi?|^/pycli)$'
altendky commented 4 years ago

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

python-desert commented 4 years ago

Or, maybe it can just go away?

Yeah