Fix imports and isort to remove from Makefile deprecated options (#1891)
* Version * Version 20.6.1 * Fix imports and isort to remove from Makefile deprecated options * duplicate the mypy ignore hint across both lines after splitting the `from trio import ...` statement onto two lines, need to duplicate the mypy ignore hint across both lines to keep mypy from complaining Co-authored-by: Ashley Sommer <ashleysommer@gmail.com>
This commit is contained in:
@@ -14,7 +14,8 @@ class Header(CIMultiDict):
|
||||
use_trio = argv[0].endswith("hypercorn") and "trio" in argv
|
||||
|
||||
if use_trio:
|
||||
from trio import open_file as open_async, Path # type: ignore
|
||||
from trio import Path # type: ignore
|
||||
from trio import open_file as open_async # type: ignore
|
||||
|
||||
def stat_async(path):
|
||||
return Path(path).stat()
|
||||
|
||||
@@ -14,10 +14,10 @@ from sanic.helpers import has_message_body, remove_entity_headers
|
||||
try:
|
||||
from ujson import dumps as json_dumps
|
||||
except ImportError:
|
||||
from json import dumps
|
||||
|
||||
# This is done in order to ensure that the JSON response is
|
||||
# kept consistent across both ujson and inbuilt json usage.
|
||||
from json import dumps
|
||||
|
||||
json_dumps = partial(dumps, separators=(",", ":"))
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import signal
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
import gunicorn.workers.base as base # type: ignore
|
||||
from gunicorn.workers import base as base # type: ignore
|
||||
|
||||
from sanic.server import HttpProtocol, Signal, serve, trigger_events
|
||||
from sanic.websocket import WebSocketProtocol
|
||||
|
||||
Reference in New Issue
Block a user