CI Perf Lint

avoid-mypy-production-bundle

Detects mypy declared in production dependency sections or bundled into CDK deployment assets.

What it detects

Why it matters

mypy is a static type checker and development-only tool. Shipping it to production:

Suggested action

Move mypy to the appropriate development dependency group:

For CDK assets, configure bundling to exclude dev dependencies or add mypy to the bundling exclusion list.

Measurement

Compare the following before and after the change:

Compatibility notes

mypy is almost never a legitimate production dependency. The only exceptions are tools that embed mypy as a library for runtime type-checking, which is extremely rare and should be explicitly reviewed.