Skip to content

Conversation

@guywilsonjr
Copy link
Contributor

Fixes #19251

Correct url in help message"None and Optional handling" group
Checklist:

  • Read the Contributing Guidelines
  • Add tests for all changed behaviour.
  • If you can't add a test, please explain why and how you verified your changes work.
$ mypy -h
....
None and Optional handling:
  Adjust how values of type 'None' are handled. For more context on how mypy handles values of type 'None', see:
  https://mypy.readthedocs.io/en/stable/kinds_of_types.html#optional-types-and-the-none-type
...
  • - Make sure CI passes.
  • - Please do not force push to the PR once it has been reviewed.

@A5rocks
Copy link
Collaborator

A5rocks commented Jun 8, 2025

Maybe it makes more sense to update the docs to support this old anchor, for people on older mypy versions?

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2025

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting and fixing! (Open to A5rocks idea in addition!)

@hauntsaninja hauntsaninja merged commit f1b496c into python:master Jun 8, 2025
19 checks passed
wyattscarpenter added a commit to wyattscarpenter/mypy that referenced this pull request Sep 11, 2025
Not sure if this will work, since something else has the same anchor on a different page... See python#19252, though.
hauntsaninja pushed a commit that referenced this pull request Nov 2, 2025
…19828)

Addresses
#19252 (comment)
> support this old anchor, for people on older mypy versions

This way, when people get the old documentation link, it will continue
to go to the right place.

I have looked at the documentation that gets generated locally to see if
everything still works. It does. In our vast panoply of documentation,
we now have two very similar refs, `no-strict-optional` and
`no_strict_optional` (used in
https://mypy.readthedocs.io/en/stable/common_issues.html#no-errors-reported-for-obviously-wrong-code
to link to
https://mypy.readthedocs.io/en/stable/command_line.html#no-strict-optional)
but the software handles them fine, without getting confused.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Help message URL incorrect for "None and Optional handling"

3 participants