diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8fe4a9106579..d816bbad9763 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -89,19 +89,9 @@ repos: rev: 'v0.950' hooks: - id: mypy + # Use setup.cfg to match the command line. args: - - --disallow-untyped-decorators - - --warn-unused-configs - - --disallow-subclassing-any - - --disallow-untyped-calls - - --disallow-untyped-defs - - --disallow-incomplete-defs - - --check-untyped-defs - - --no-implicit-optional - - --warn-redundant-casts - - --warn-unused-ignores - - --warn-return-any - - --pretty + - --config-file=setup.cfg # This should match the requirements added in the WORKSPACE pip_install. additional_dependencies: - gql >= 2.0.0, < 3.0.0 diff --git a/setup.cfg b/setup.cfg index 92a5e4d01094..b518b9461a19 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,3 +6,10 @@ max-line-length = 80 # E203: This warning is not PEP 8 compliant. extend-ignore = E203 + +[mypy] +pretty = True +# Define flags relative to strict mode. +strict = True +# TODO: Look at updating code to fix these. +disallow_any_generics = False