python / python/mypy

Documentation code blocks should be type checked as real tests

Open
#19,919 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature topic-developer
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

Feature

Ideally, if anyone has the time, documentation code blocks should be type checked as real tests

Pitch

This will ensure that the examples stay up to date and valid; provide an obvious home for basic test coverage where it can also inform the user; and, as an added bonus, necessarily implies fixing the issue about how the documentation test examples don't use real errors.

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

No files, tests, or entry points are named. Start by locating how documentation code blocks are currently tested, then determine how they could be type checked as real tests. Done means documentation examples are checked for validity and the linked issue about examples not using real errors is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.