update pre-commit-config replacing black and pylint with ruff #366
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is for #350, because I too wanted to replace black with ruff. There's a lot going on here but it's largely cosmetic. After changing the pre-commit file following the pytensor pre-commit config I:
pre-commit run --all-files
--unsafe-fixes
option. These were largely import errors (F401) or Local variablemu
is assigned to but never used (F841, common when people write pymc models in tests).The dubious ones that I changed which might be bugs were:
gp.latent_approx.py
L144mu = self.mean_func(X)
never used? Should it be?def rv_op( # noqa: F811
. I added the skip here butrv_op
is specified above (e.g.rv_op = LinearGaussianStateSpaceRV
) then overwritten in a class method. Just checking the desired behaviour