python / python/mypy

Enable only a few error codes

Open
#7,599 2 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature needs discussion priority-1-normal topic-configuration
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

  • Are you reporting a bug, or opening a feature request?
    Feature request

I think one of the largest problems with static analyzers is dealing with legacy code. Mypy has a nice documentation about it https://mypy.readthedocs.io/en/latest/existing_code.html

However, what I'm missing is a way to only enable a few checks. In this way I can start by only enabling the most critical checks (eg. name-defined).

As an example, in pylint you can configure the list of checks at the config file, or do --disable=all --enable=check1,check2
http://pylint.pycqa.org/en/latest/user_guide/run.html#command-line-options

thank you guys for this awesome project!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading mypy's configuration and error-code handling, then compare the requested allowlist behavior with the existing options. Done means users can enable only selected checks, including a case such as name-defined, through configuration or the command line, with documentation and tests covering the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.