-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrongtopic-error-reportingHow we report errorsHow we report errorstopic-type-ignore# type: ignore comments# type: ignore commentstopic-usability
Description
def _exception_handler(self, loop: asyncio.AbstractEventLoop,
context: Mapping[str, Any]) -> None: # type: ignore[misc]
In this example, the error produced is error: Explicit "Any" is not allowed [misc].
It says the error is on line 1, but clearly is on line 2.
That's not a problem in itself, I assume it's just treating the wrapped line as a single line.
However, the ignore comment, which is on the correct line, is not recognised by Mypy unless it is moved to the first line. If Mypy is going to treat wrapped lines as a single line, then the comments should also get wrapped to that same line.
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-error-reportingHow we report errorsHow we report errorstopic-type-ignore# type: ignore comments# type: ignore commentstopic-usability