TYPE007infoPro

duplicate-type-definition

Type definition may be duplicated across files.

Applies to: Python, TypeScript

Why this matters

Having the same type defined in multiple places leads to drift and bugs. When you update one definition, you might forget the others. Extract shared types to a common module and import from there.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, TYPE007 includedstablestack explain TYPE007

TYPE007 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

False positive in your codebase? Suppress a single line with # noqa: TYPE007