According to the documentation, pre-commit runs mypy with only the --ignore-missing-imports flag. So if I'm not wrong the pyproject.toml file is not being used, which results in the strict = true setting in the [tool.mypy] section being ignored, causing pre-commit to bypass strict checks.