Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn about --follow-untyped-imports #18249

Merged
merged 5 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/source/command_line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ imports.

.. option:: --follow-untyped-imports

This flag makes mypy analyze imports without stubs or a py.typed marker.
This flag makes mypy analyze imports even if missing a py.typed marker or stubs.
hauntsaninja marked this conversation as resolved.
Show resolved Hide resolved

Note that analyzing all unannotated modules might result in issues
when analyzing code not designed to be type checked and may significantly
increase how long mypy takes to run.
hauntsaninja marked this conversation as resolved.
Show resolved Hide resolved

.. option:: --follow-imports {normal,silent,skip,error}

Expand Down
9 changes: 6 additions & 3 deletions docs/source/config_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,15 @@ section of the command line docs.
:type: boolean
:default: False

Typechecks imports from modules that do not have stubs or a py.typed marker.
Makes mypy analyze imports even if missing a py.typed marker or stubs.

Note that analyzing all unannotated modules might result in issues
when analyzing code not designed to be type checked and may significantly
increase how long mypy takes to run.
hauntsaninja marked this conversation as resolved.
Show resolved Hide resolved

If this option is used in a per-module section, the module name should
match the name of the *imported* module, not the module containing the
import statement. Note that scanning all unannotated modules might
significantly increase the runtime of your mypy calls.
import statement
hauntsaninja marked this conversation as resolved.
Show resolved Hide resolved

.. confval:: follow_imports

Expand Down
Loading