2 Comments
Aug 3, 2023·edited Aug 3, 2023Liked by Laszlo Sragner

So very close to how I set things up. I hadn't really considered extending line-length from 88...but I might, now! Lots of little things I hadn't seen, like half the ruff configs.

A few things I do differently:

- install all those tools with `--group dev`; I don't want pytest, ruff etc. in production builds, even if they don't add much

- with pre-commit in the environment, you don't need `poetry run` in the commit-hooks

- does your ruff hook work as intended? does the hook fail if it finds an error it can't autofix? I ended up needing `ruff check --force-exclude --fix --exit-non-zero-on-fix` as well as `require_serial: true` though I can't remember why I needed force-exclude or require_serial

- let unittest stay dead. I still use classes with pytest, but I don't need to inherit a special class, and I can use plan `assert`s instead of the weird unittest functions

Expand full comment