STRUCT009infoPro

class-filename-mismatch

Class name doesn't match filename convention.

Applies to: Python

Why this matters

When a file contains a main class, the filename should match the class name in snake_case. For example, UserService class should be in user_service.py. This makes it easy to find classes and helps AI assistants navigate your code.

Catch it before it ships

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

STRUCT009 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: STRUCT009