repos:
-   repo: https://github.com/ambv/black
    rev: 18.9b0
    hooks:
    - id: black
      language_version: python3.6
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v1.4.0  # Use the ref you want to point at
    hooks:
    -   id: trailing-whitespace
    -   id: check-ast
    -   id: check-merge-conflict
    -   id: flake8
        language_version: python2.7
-   repo: https://github.com/CanalTP/navitia-pre-commit
    rev: master
    hooks:
    -   id: clang-format-6.0
        verbose: true
        exclude: ^source/third_party/
        files: \.(c|cc|cxx|cpp|h|hpp|hxx)$
        args: [-i]
-   repo: https://github.com/pre-commit/mirrors-mypy
    rev: v0.670
    hooks:
    -   id: mypy
        args: [--ignore-missing-imports, --py2]
        files: source/jormungandr/jormungandr
        language_version: python3.6

repos:
-   repo: https://github.com/ambv/black
    rev: 18.9b0
    hooks:
    - id: black
      language_version: python3.6
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v1.4.0  # Use the ref you want to point at
    hooks:
    -   id: trailing-whitespace
    -   id: check-ast
    -   id: check-merge-conflict
    -   id: flake8
        language_version: python2.7
-   repo: https://github.com/CanalTP/navitia-pre-commit
    rev: master
    hooks:
    -   id: clang-format-6.0
        verbose: true
        exclude: ^source/third_party/
        files: \.(c|cc|cxx|cpp|h|hpp|hxx)$
        args: [-i]
-   repo: https://github.com/pre-commit/mirrors-mypy
    rev: v0.670
    hooks:
    -   id: mypy
        args: [--ignore-missing-imports, --py2]
        files: source
        language_version: python3
        exclude: /monitor/|/third_party/|/tests/|/sql/|env\.py$|setup\.py$

Check all python files with Mypy
Check all python files with Mypy

* Mypy check any python projects and not only Jormungandr
* allow to use any version of Python3 for Mypy
