Skip to content
Snippets Groups Projects
.pre-commit-config.yaml 1.38 KiB
Newer Older
repos:
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.3.0
    hooks:
    -   id: check-merge-conflict # prevent committing files with merge conflicts
    -   id: flake8 # checks for flake8 errors
-   repo: https://github.com/psf/black
Colm Talbot's avatar
Colm Talbot committed
    rev: 22.3.0
    hooks:
      - id: black
        language_version: python3
        files: '^(bilby/bilby_mcmc/|bilby/core/sampler/|examples/)'
-   repo: https://github.com/codespell-project/codespell
    rev: v2.1.0
    hooks:
    -   id: codespell
        args: [--ignore-words=.dictionary.txt]
-   repo: https://github.com/pre-commit/mirrors-isort
Colm Talbot's avatar
Colm Talbot committed
    rev: v5.10.1
    hooks:
    -   id: isort # sort imports alphabetically and separates import into sections
        args: [-w=88, -m=3, -tc, -sp=setup.cfg ]
        files: '^(bilby/bilby_mcmc/|bilby/core/sampler/|examples/)'
Colm Talbot's avatar
Colm Talbot committed
-   repo: https://github.com/datarootsio/databooks
    rev: 0.1.14
    hooks:
      - id: databooks
        name: databooks
        description:
          "Remove notebook metadata using `databooks`."
        entry: databooks meta
        language: python
        minimum_pre_commit_version: 2.9.2
        types: [ jupyter ]
        args: [-w]
-   repo: local
    hooks:
      - id: jupyter-nb-clear-output
        name: jupyter-nb-clear-output
        files: \.ipynb$
        language: system
        entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace