Skip to content

runtime flag to disable all # type: ignore comments #19476

@jvanasco

Description

@jvanasco

Feature

I thought this might be supported, but could not find it in the docs or --help. I also couldn't find this request as a closed or open issue; apologies if this has been discussed.

I believe it would be beneficial for mypy to have a --disable-ignores flag or similar.

The flag would simply ignore all code decorated with # type: ignore* or similar.

Pitch

This would simplify auditing and managing legacy code.

Often times, errors are suppressed because mypy does not yet have a relevant feature or the developer's codebase requires too much refactoring. This is somewhat similar to the current support for unused ignores, but would help developers catch situations where slight edits to code might make it conformant to mypy.

Periodically disable all ignores for an audit is an important part of maintaining code health. Bringing this functionality into mypy would be much easier than running mypy on a version of the code with the ignores stripped.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy