Add flags to pass on --warn-unused-ignores and --no-implicit-optional to mypy (#1421)

* Add flags to pass on --warn-unused-ignores and --no-implicit-optional to mypy
* Make implicit Optional explicit in arg types (2and3 part)
* Convert {stdlib,third_party}/2 to explicit Optional
This commit is contained in:
Guido van Rossum
2017-06-20 22:18:49 -07:00
committed by Jelle Zijlstra
parent 30256097ea
commit 04fe184dcf
23 changed files with 257 additions and 237 deletions

View File

@@ -2,7 +2,7 @@ from abc import abstractmethod
import asyncore
import socket
import sys
from typing import Union, Tuple, Sequence
from typing import Optional, Sequence, Tuple, Union
class simple_producer:
@@ -12,7 +12,7 @@ class simple_producer:
class async_chat(asyncore.dispatcher):
ac_in_buffer_size = ... # type: int
ac_out_buffer_size = ... # type: int
def __init__(self, sock: socket.socket = None, map: asyncore._maptype = None) -> None: ...
def __init__(self, sock: Optional[socket.socket] = None, map: Optional[asyncore._maptype] = None) -> None: ...
@abstractmethod
def collect_incoming_data(self, data: bytes) -> None: ...