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

Interest with pre-commit? #408

Closed
vwxyzjn opened this issue Jun 6, 2023 · 2 comments
Closed

Interest with pre-commit? #408

vwxyzjn opened this issue Jun 6, 2023 · 2 comments

Comments

@vwxyzjn
Copy link
Contributor

vwxyzjn commented Jun 6, 2023

Hey, would you be interested in using pre-commit to do the formatting stuff? It can help take out some dependencies from setup.py and offer IMO a smoother experience (the CI checks nicely, and you can easily run to modify content in place).

We can also add

  - repo: https://github.com/asottile/pyupgrade
    rev: v2.31.1
    hooks:
      - id: pyupgrade
        args: 
          - --py37-plus

which upgrade syntax and

  - repo: https://github.com/myint/autoflake
    rev: v1.4
    hooks:
      - id: autoflake
        args:
          - -r
          - --exclude=wandb
          - --in-place
          - --remove-unused-variables
          - --remove-all-unused-imports

which automatically removes unused variables and imports.

@lvwerra
Copy link
Member

lvwerra commented Jun 19, 2023

That would be nice indeed!

@lvwerra
Copy link
Member

lvwerra commented Jul 5, 2023

Since #448 we have this so closing this.

@lvwerra lvwerra closed this as completed Jul 5, 2023
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

No branches or pull requests

2 participants