Skip to content

Enable exhaustive-match checks for mypy #414

@llucax

Description

@llucax

What's needed?

It is good to have exhaustiveness checks when using the match statement, to make sure if the type is extended, no cases are left accidentally unhandled.

Proposed solution

Change the cookiecutter template to include:

[tool.mypy]
enable_error_code = ["exhaustive-match"]

Use cases

No response

Alternatives and workarounds

No response

Additional context

The new check will be probably released in mypy 1.17

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:templateAffects the cookiecutter template filespart:toolingAffects the development tooling (CI, deployment, dependency management, etc.)type:enhancementNew feature or enhancement visitble to users

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions