You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in MindGPT-72 several of the pre-commit hooks could do with updating as they all appear to be running on versions from around March 2023 (or July 2020 in the case of pre-commit-hooks).
Details
Repo
MindGPT
Latest
pre-commit-hooks
3.2.0
4.4.0
black
22.10.0
23.7.0
ruff-pre-commit
0.0.257
0.0.287
mirrors-mypy
1.1.1
1.5.1
typos
1.16.1
1.16.11
You might not want to be right at the bleeding edge for some of the packages (say ruff-pre-commit which is still fairly new) but it would be worth updating in general I think.
Potential approach 1
Run the builtin autoupdate in pre-commit:
pre-commit autoupdate
This will automatically update to the most recent revision on the primary branch:
Run pre-commit against all files in the repo to check the up-versioning has not resulted in any failures
Spoilers: it will I am afraid.
E.g. black has changed some of their prioritisation for long-line wrapping in function names.
The good news is that most of them will be autofixed with a single run (or when I have had a quick look 90% of the issues are auto-resolved).
Update the dev dependencies (manually unfortunately)
Unfortunately I don't think there is a nice way to get poetry to automatically pick up the updated pre-commit hook versions so you would have to manually uplift the dependencies in pyproject.toml
Update the lock file
poetry update
Optionally you could just update the dev dependencies with:
poetry update --only dev
Potential approach 2
Not really investigated this route much but would be worth a further look.
The sync_with_poetry hook flips approach 1 and takes the rev generated by poetry in the lock file as the package rev to use. It then pushes that value into the .pre-commit-config.yaml file, ensuring they remain in sync with poetry.
Documentation
Once decided upon, it would be worth including some developer documentation on how to keep the packages up to date across poetry and pre-commit.
An aside
It is also worth noting that you do not have some of your pre-commit dependencies included in the [tool.poetry.group.dev.dependencies] block. Namely: black and ruff.
Not sure if this is intentional on your part or not? You get them as secondary dependencies through several other packages but you might want to look at including them.
The text was updated successfully, but these errors were encountered:
Description of the problem
As mentioned in MindGPT-72 several of the pre-commit hooks could do with updating as they all appear to be running on versions from around March 2023 (or July 2020 in the case of pre-commit-hooks).
Details
pre-commit-hooks
black
ruff-pre-commit
mirrors-mypy
typos
You might not want to be right at the bleeding edge for some of the packages (say
ruff-pre-commit
which is still fairly new) but it would be worth updating in general I think.Potential approach 1
pre-commit
:This will automatically update to the most recent revision on the primary branch:
pre-commit
against all files in the repo to check the up-versioning has not resulted in any failuresSpoilers: it will I am afraid.
E.g.
black
has changed some of their prioritisation for long-line wrapping in function names.The good news is that most of them will be autofixed with a single run (or when I have had a quick look 90% of the issues are auto-resolved).
Unfortunately I don't think there is a nice way to get
poetry
to automatically pick up the updatedpre-commit
hook versions so you would have to manually uplift the dependencies in pyproject.tomlOptionally you could just update the dev dependencies with:
Potential approach 2
Not really investigated this route much but would be worth a further look.
The sync_with_poetry hook flips approach 1 and takes the rev generated by
poetry
in the lock file as the package rev to use. It then pushes that value into the .pre-commit-config.yaml file, ensuring they remain in sync withpoetry
.Documentation
Once decided upon, it would be worth including some developer documentation on how to keep the packages up to date across poetry and pre-commit.
An aside
It is also worth noting that you do not have some of your pre-commit dependencies included in the [tool.poetry.group.dev.dependencies] block. Namely:
black
andruff
.Not sure if this is intentional on your part or not? You get them as secondary dependencies through several other packages but you might want to look at including them.
The text was updated successfully, but these errors were encountered: