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 option for pre-commit #23

Open
veit opened this issue Jan 23, 2020 · 0 comments
Open

Add option for pre-commit #23

veit opened this issue Jan 23, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@veit
Copy link
Owner

veit commented Jan 23, 2020

  • pre-commit offers a framework for running hooks before committing code.
  • Config pre-commit-config.yaml:
    repos:
      - repo: https://github.com/psf/black
        rev: 19.10b0
        hooks:
          - id: black
            language_version: python3.7
            # override until resolved: https://github.com/ambv/black/issues/402
        files: \.pyi?$
            types: []
    
      - repo: https://gitlab.com/pycqa/flake8
        rev: 3.7.9
        hooks:
          - id: flake8
            language_version: python3.7
    
      - repo: https://github.com/asottile/seed-isort-config
    rev: v1.9.4
        hooks:
          - id: seed-isort-config
    
      - repo: https://github.com/pre-commit/mirrors-isort
    rev: v4.3.21
        hooks:
          - id: isort
            additional_dependencies: [toml]
            language_version: python3.7
    
      - repo: https://github.com/pre-commit/pre-commit-hooks
        rev: v2.4.0
        hooks:
          - id: trailing-whitespace
          - id: end-of-file-fixer
          - id: debug-statements
    
  • Run pre-commit run --all-files
@veit veit added the enhancement New feature or request label Jan 23, 2020
@veit veit self-assigned this Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant