Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update pre-commit-config replacing black and pylint with ruff #366

Closed
wants to merge 2 commits into from

Conversation

theorashid
Copy link
Contributor

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:

  • ran pre-commit run --all-files
  • manually changed the remaining errors rather than using the --unsafe-fixes option. These were largely import errors (F401) or Local variable mu 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 L144 mu = self.mean_func(X) never used? Should it be?
  • statespace e.g. def rv_op( # noqa: F811. I added the skip here but rv_op is specified above (e.g. rv_op = LinearGaussianStateSpaceRV) then overwritten in a class method. Just checking the desired behaviour

@theorashid
Copy link
Contributor Author

Couple of follow ups:

  • why is conftest.py in the root. is that normal?
  • can the setup.py/setupegg.py/pyproject.toml be consolidated into just pyproject.toml (happy to give this a go)
  • can I add .venv/ and python-version to the .gitignore for those of us who use venv/pyenv instead of conda

@twiecki twiecki requested a review from juanitorduz July 24, 2024 08:07
@zaxtax
Copy link
Contributor

zaxtax commented Jul 26, 2024

Should this be combined with #368 ?

@theorashid
Copy link
Contributor Author

Working with @jessegrabowski to merge ours together. No need to review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants