python-trio / flake8-async

Highly opinionated linter for Trio code
https://flake8-async.readthedocs.io
MIT License
17 stars 2 forks source link

Add pre-commit bot to repo #97

Closed jakkdl closed 1 year ago

jakkdl commented 1 year ago

@Zac-HD With #88 merged you need to add https://pre-commit.ci/ to the repository for the checks to actually run. High priority, although I have the hook installed locally so won't push code that doesn't pass the checks.

Zac-HD commented 1 year ago

I was thinking we'd just add pre-commit run --all to the Actions config, but could use pre-commit CI if preferred.

jakkdl commented 1 year ago

We mostly just miss out on getting pinged about hook updates automatically (auto-fixing PR's and the speed are w/e), which seems handy - but I haven't it run in CI on any repos I maintain so I don't have too strong of an opinion.

Zac-HD commented 1 year ago

Let's just go with Actions for now, I think running the update command occasionally will be easier than working across multiple platforms.

jakkdl commented 1 year ago

What do you see as issues with working across multiple platforms? Just curious of any downsides I'm not aware of

Zac-HD commented 1 year ago

Nothing major, just e.g. tiny UX papercuts from having two separate sites to check, click retry on, or whatever else.

jakkdl commented 1 year ago

Ah, sure. Don't check those often myself, but makes sense. Looks like it's possible to homebrew auto-updates as well with github actions https://browniebroke.com/blog/gh-action-pre-commit-autoupdate/ - or I might at least set up a local hook that checks for updates.

Zac-HD commented 1 year ago

If you're going that far, check out the tox -e deps and pinning setup for shed; that plus a monthly Actions cronjob and update PR ala Hypothesis is nice to work with and pretty easy.