#Python: linting vs formattingIMHO
1 messages ยท Page 1 of 1 (latest)
In practice, the python community makes a distinction between linting and formatting.
Black is a popular formatter because it is extremely opinionated. Some scenarios are not well suited for running Black.
If you decide that the situation does not require forced conformity to Black's rules, you might consider
https://astral.sh/ruff
Ruffs is a linter with the option of enforcing formatting.
It's in the sdk's readme: hatch run fmt, but I suspect this is due to a new thing from black which was updated recently. I'll need to configure it out.
what's a hatch ๐
any way we could add a sdk:python:fmt target?
or maybe run it after generate?
hatch is the build tool
I plan on converting the hatch run commands to python modules. fmt does run after generate but only for the generated client file, not the whole library.
If you like, I have a python user group meeting in an hour and I can ask for examples of different hatch targets.
(btw, it is a public group, everyone is invited to join the office hours)
that's OK, really just trying to get my PR green ๐
LOL, in that case, let Black make the changes.
I'll take care of it in a few. As I said, it's because of https://github.com/dagger/dagger/pull/5757/commits/19b3109eb3012cde091dd044f2b6ef93591da21f#diff-a64e9e32bf9669478f8acde60ab7c7c77da5069c8b362067f7ff6103633319aa. Black must have added a new formatting rule and I need to exclude it.