requests-cache / aiohttp-client-cache

An async persistent cache for aiohttp requests
MIT License
118 stars 20 forks source link

Add "pyupgrade" pre-commit hook and auto-format the code accordingly #206

Closed alessio-locatelli closed 10 months ago

alessio-locatelli commented 10 months ago

What

As a part of work on https://github.com/requests-cache/aiohttp-client-cache/issues/164, I added https://github.com/asottile/pyupgrade with the target Python version defined as 3.8.

I did make unrelated changes (any Python 3.7 leftovers, if any, should removed in a separate PR).

Breaking changes

No.

User guide, contribution guidelines, changelog update

Not required.

HISTROY.md already has a related record: https://github.com/requests-cache/aiohttp-client-cache/blame/main/HISTORY.md#L5


I think that the next step is removing Black, Flake8, Isort, pyupgrade because Ruff re-implemented all of them. Similar to https://github.com/requests-cache/requests-cache/commit/83f7bc77e4daeab70e19e29a1ed1ba4bcabff9e1 but in that PR you replaced only Flake8.

JWCook commented 10 months ago

I think that the next step is removing Black, Flake8, Isort, pyupgrade because Ruff re-implemented all of them.

Good point. I was holding off on that until ruff's formatter was out of beta, but this post describes it as "production-ready." I'll give it a try!

JWCook commented 10 months ago

Whoops, it looks like merging #207 automatically closed this one because #207 included these same commits + revert commits.

simon-liebehenschel commented 10 months ago

Whoops, it looks like merging #207 automatically closed this one because #207 included these same commits + revert commits.

Wow, sorry I this a mistake on my side. I will tale care of this the next time.

I use GitLab the most of the time.

JWCook commented 10 months ago

No problem! I don't think I've seen that before either. I just manually removed the revert commits, so both of these MRs are in main now. Thanks again for the help!