0xFableOrg / roll-op

The simplest way to spin your own dev / prod rollup, fully configurable.
BSD 3-Clause Clear License
92 stars 25 forks source link

Need an unique code formatter #28

Closed GrapeBaBa closed 1 year ago

GrapeBaBa commented 1 year ago

Currently, when I reformat in IDE(pycharm/vscode), some non related code format changed. It is better to specific a formatter. @ayazabbas Could you give us a suggestion which pythonic?

ayazabbas commented 1 year ago

From @norswap initial setup of the project I believe we are already using ruff for linting and it looks like it includes a formatter

GrapeBaBa commented 1 year ago

From @norswap initial setup of the project I believe we are already using ruff for linting and it looks like it includes a formatter

however it seems not have a CLI for formatting? ruff check not auto format code if I don't use a IDE plugin, both codes passed.

ayazabbas commented 1 year ago

Aha, looks like they are working on it https://github.com/astral-sh/ruff/issues/1904

In that case I suggest we use black and isort for formatting

norswap commented 1 year ago

I'm really not a fan of strongly opinionated formatters like Black with no opt-outs. But there doesn't really seem to be another good option, is there?

ayazabbas commented 1 year ago

autopep8 is less opinionated, maybe we can give that a try

norswap commented 1 year ago

Yeah, that seems nice!