Update mypy==0.740 (#151)

This commit is contained in:
Abhinav Singh 2019-10-28 15:29:33 -07:00 committed by GitHub
parent e14548252c
commit 1ce16b95de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -14,6 +14,7 @@ import socket
from types import TracebackType from types import TracebackType
from typing import Optional, Dict, Any, List, Tuple, Type, Callable from typing import Optional, Dict, Any, List, Tuple, Type, Callable
from typing_extensions import Literal
from .constants import HTTP_1_1, COLON, WHITESPACE, CRLF from .constants import HTTP_1_1, COLON, WHITESPACE, CRLF
@ -185,7 +186,7 @@ class socket_connection(contextlib.ContextDecorator):
self, self,
exc_type: Optional[Type[BaseException]], exc_type: Optional[Type[BaseException]],
exc_val: Optional[BaseException], exc_val: Optional[BaseException],
exc_tb: Optional[TracebackType]) -> bool: exc_tb: Optional[TracebackType]) -> Literal[False]:
if self.conn: if self.conn:
self.conn.close() self.conn.close()
return False return False

View File

@ -117,7 +117,7 @@ class HttpParser:
self.host, self.port = self.url.hostname, self.url.port \ self.host, self.port = self.url.hostname, self.url.port \
if self.url.port else 80 if self.url.port else 80
else: else:
raise KeyError('Invalid request\n%s' % self.bytes) raise KeyError(b'Invalid request\n%b' % self.bytes)
self.path = self.build_url() self.path = self.build_url()
def is_chunked_encoded(self) -> bool: def is_chunked_encoded(self) -> bool:

View File

@ -4,6 +4,6 @@ flake8==3.7.9
pytest==5.2.2 pytest==5.2.2
pytest-cov==2.8.1 pytest-cov==2.8.1
autopep8==1.4.4 autopep8==1.4.4
mypy==0.730 mypy==0.740
py-spy==0.3.0 py-spy==0.3.0
codecov==2.0.15 codecov==2.0.15