Add --no-mypy option to disable mypy check

Open
#138 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
testing-qa

Research direction

Start by reviewing pytest.ini and the plugin option handling, then compare the linked pytest-pylint and pytest-cov implementations. The work is done when pytest accepts --no-mypy and skips the configured mypy check while the default --mypy behavior remains unchanged.

Written by the indexing model from the issue text.

Description

integration

Right now I have --mypy in my pytest.ini file so that mypy runs by default when my tests are run, both locally and in CI

However, when I'm quickly iterating in testing a new feature, I would like to skip the mypy check since I first just want to make sure that the feature works.

Having a --no-mypy option to pass through to pytest when running locally would be great, rather than having to just deal with the mypy run each time, or go and manually modify my pytest.ini file to comment out the --mypy option.

The pytest-pylint and pytest-cov plugins provide this functionality:

I'm happy to add a PR if you agree that this is a worthwhile feature

Dominant language
Python
Stars
257
Forks
33
PR merge metrics
No merged PRs in 30d

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.

More from realpython/pytest-mypy

All issues in realpython/pytest-mypy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.