From 38069a427edc518896e38f841c50fd9d70794e28 Mon Sep 17 00:00:00 2001 From: Diego Ramirez Date: Mon, 21 Jun 2021 08:56:06 -0500 Subject: [PATCH 1/2] Add a `--strict` option to the Mypy checks It must close pypa#10076, to include all the strict flags from Mypy to be used on pypa/pip. --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a343d1a99a1..7c93c32fbdf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,7 +60,7 @@ repos: hooks: - id: mypy exclude: tests - args: ["--pretty"] + args: ["--pretty", "--strict"] additional_dependencies: ['nox==2020.12.31'] - repo: https://github.com/pre-commit/pygrep-hooks From 332ee7cffa63f1fe63e6ada70197e410a8cf521d Mon Sep 17 00:00:00 2001 From: Diego Ramirez Date: Mon, 21 Jun 2021 13:16:20 -0500 Subject: [PATCH 2/2] Add `--no-implict-optional` instead of `--strict` It applies for the Mypy check. --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c93c32fbdf..c9e9e740d80 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,7 +60,7 @@ repos: hooks: - id: mypy exclude: tests - args: ["--pretty", "--strict"] + args: ["--pretty", "--no-implicit-optional"] additional_dependencies: ['nox==2020.12.31'] - repo: https://github.com/pre-commit/pygrep-hooks