python-trio / trio

Trio – a friendly Python library for async concurrency and I/O
https://trio.readthedocs.io
Other
6.22k stars 342 forks source link

Enable pre-commit.ci pull-request autofixing #3123

Closed CoolCat467 closed 1 month ago

CoolCat467 commented 1 month ago

In this pull request, we allow pre-commit.ci to autofix pull requests. The specific pre-commit hooks we use are all designed well and will avoid making changes that might cause issues, and people usually end up saying the trigger message to fix their pull requests anyways.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.62%. Comparing base (57452ad) to head (42830d7). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3123 +/- ## ======================================= Coverage 99.62% 99.62% ======================================= Files 122 122 Lines 18340 18340 Branches 3281 3281 ======================================= Hits 18271 18271 Misses 47 47 Partials 22 22 ```
A5rocks commented 1 month ago

I think the main concern with this is having to remember to git pull whenever this happens, whereas someone could trivially fix it locally...

But to be honest I'm not as sold on that line of thought as I once was (for one, anyone committing things from a machine could have installed pre-commit to begin with). Now I'm neutral on this, rather than negative.

The main issue IMO w/ our pre-commit setup in general is that our autogenerated files hook is not great, cause it relies on having astor etc installed. But that's irrelevant to this as a PR.

jakkdl commented 1 month ago

I think the main concern with this is having to remember to git pull whenever this happens, whereas someone could trivially fix it locally...

even if you do forget to pull you can usually just rebase and everything gets resolved.