Skip to content

Whole file # type: ignore does not silence import errors  #6852

Closed
@gwk

Description

@gwk

I just discovered PR #6830 and tried it out in master. It seems to work for the most part, but Mypy still complains about missing stub files. For example:

# type: ignore
import boto3 # This does not get ignored.
n:List[int] = 'a' # This gets ignored.
x.py:2: error: No library stub file for module 'boto3'
x.py:2: note: (Stub files are from https://github.com/python/typeshed)

It seems missing a critical stub file is a good use case for ignoring an entire file, but perhaps I'm missing something. Hope this helps!

version: mypy 0.710+dev.7cef06bc65d416ed3a533bbc4c630bd9417adb06.dirty

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions