Skip to content

Commit

Permalink
Improve searchability for module level type ignore errors (#14342)
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja authored Dec 25, 2022
1 parent 31b0413 commit c246a52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/source/common_issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ Ignoring a whole file

A ``# type: ignore`` comment at the top of a module (before any statements,
including imports or docstrings) has the effect of ignoring the entire contents of the module.
This behaviour can be surprising and result in
"Module ... has no attribute ... [attr-defined]" errors.

To only ignore errors, use a top-level ``# mypy: ignore-errors`` comment instead.
To only ignore errors with a specific error code, use a top-level
Expand Down

0 comments on commit c246a52

Please sign in to comment.