mirror of https://github.com/encode/starlette.git
Ignore gnarly type check in WSGI implementation (#756)
* Ignore gnarly type check in WSGI implementation * Linting
This commit is contained in:
parent
d2b65c3c99
commit
00e8300804
|
@ -88,7 +88,7 @@ class WSGIResponder:
|
|||
await run_in_threadpool(self.wsgi, environ, self.start_response)
|
||||
self.send_queue.append(None)
|
||||
self.send_event.set()
|
||||
await asyncio.wait_for(sender, None)
|
||||
await asyncio.wait_for(sender, None) # type: ignore
|
||||
if self.exc_info is not None:
|
||||
raise self.exc_info[0].with_traceback(
|
||||
self.exc_info[1], self.exc_info[2]
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from starlette.config import Config, Environ, EnvironError
|
||||
from starlette.datastructures import URL, Secret
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def test_config(tmpdir, monkeypatch):
|
||||
path = os.path.join(tmpdir, ".env")
|
||||
|
@ -47,7 +46,7 @@ def test_config(tmpdir, monkeypatch):
|
|||
config.get("REQUEST_HOSTNAME", cast=bool)
|
||||
|
||||
config = Config(Path(path))
|
||||
REQUEST_HOSTNAME= config("REQUEST_HOSTNAME")
|
||||
REQUEST_HOSTNAME = config("REQUEST_HOSTNAME")
|
||||
assert REQUEST_HOSTNAME == "example.com"
|
||||
|
||||
config = Config()
|
||||
|
@ -60,6 +59,7 @@ def test_config(tmpdir, monkeypatch):
|
|||
with pytest.raises(ValueError):
|
||||
config.get("BOOL_AS_INT", cast=bool)
|
||||
|
||||
|
||||
def test_environ():
|
||||
environ = Environ()
|
||||
|
||||
|
|
Loading…
Reference in New Issue