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

Add pre-commit hooks for ruff #629

Merged
merged 4 commits into from
Oct 23, 2024
Merged

Conversation

claydugo
Copy link
Contributor

@claydugo claydugo commented Oct 22, 2024

I did this with their recommended setup where you specify a revision.

You can alternatively set it up to use the users ruff binary with something like:

repos:
  - repo: local
    hooks:
      - id: ruff
        name: ruff
        entry: ruff check .
        language: system

This is opt-in and requires running pre-commit install. Otherwise the current manual workflow still applies.

@claydugo claydugo requested a review from Korijn as a code owner October 22, 2024 13:45
@claydugo claydugo mentioned this pull request Oct 22, 2024
README.md Outdated Show resolved Hide resolved
@Korijn Korijn merged commit c2551b2 into pygfx:main Oct 23, 2024
21 checks passed
@fyellin
Copy link
Contributor

fyellin commented Oct 23, 2024

It's probably too late. But I just saw the README.md, and I have absolutely no idea what it means.

Optionally, if you install pre-commit hooks with pre-commit install, lint fixes and formatting will be automatically applied on git commit.

Is pre-commit install a command I'm supposed to type at the shell? (It doesn't work). Is it a git command? (There is no such git command). From searching the web, it appears that this is a Python package that I'm supposed to install. We shouldn't make readers of READER.md have to search the web. Maybe pre-commit should be part of the pip -e .[dev]. ?

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.

4 participants