python / python/mypy

Inconsistent description of `strict_optional`

Open Beginner friendly
#21,658 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

Documentation

config_file.html says that "strict_optional {...} effectively disables checking of optional types and None values."

command_line.html says that "--no-strict-optional {...} effectively disables checking of optional types and None values."

Which is correct?

Additionally, the note "strict_optional=False is evil" (alternatively "--no-strict-optional is evil") is not terribly helpful for debugging a system which already uses these settings - a link to further info would be useful.

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

Check the linked None and Optional Handling sections in config_file.html and command_line.html first. Reconcile the descriptions of strict_optional and --no-strict-optional, then improve the “strict_optional=False is evil” note with a link to further information. Done means both pages describe the setting consistently and provide debugging guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.