擅长:python、mysql、java
<p>您可以使用<code># type: ignore</code>从<a href="https://github.com/python/mypy/commit/c0334e419a8b50eb4844e5dadc48399036f12ed3" rel="noreferrer">0.57</a>开始执行此操作(请参见<a href="https://github.com/python/mypy/issues/500" rel="noreferrer">#500, Ignore specific lines</a>):</p>
<blockquote>
<p><a href="https://github.com/python/mypy/issues/500#issuecomment-86340780" rel="noreferrer">PEP 484 uses <code># type: ignore</code> for ignoring type errors on particular lines, and mypy should support that. Also, using <code># type: ignore</code> close to the top of a file should skip checking that file altogether.</a></p>
</blockquote>