From 0e6fbb60dcbf860d4aaf6377876bff72cba40538 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Wed, 30 May 2018 14:33:54 -0700 Subject: [PATCH] Add a README --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..6440496 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +mypy mirror +=========== + +Mirror of mypy for pre-commit. + +For pre-commit: see https://github.com/pre-commit/pre-commit +For mypy: see https://github.com/python/mypy + +### Using mypy with pre-commit: + +Add this to your `.pre-commit-config.yaml` + +```yaml +- repo: https://github.com/pre-commit/mirrors-mypy + rev: '' # Use the sha / tag you want to point at + hooks: + - id: mypy +``` + + +By default, mypy will run with `mypy --ignore-missing-imports`, `pre-commit` +runs `mypy` from an isolated virtualenv so it won't have access to those. +To change the arguments, override the `args` as follows: + +```yaml + hooks: + - id: mypy + args: [--no-strict-optional, --ignore-missing-imports] +```