File tree 6 files changed +16
-12
lines changed
6 files changed +16
-12
lines changed Original file line number Diff line number Diff line change
1
+ queries :
2
+ - exclude : py/unsafe-cyclic-import
Original file line number Diff line number Diff line change @@ -975,9 +975,8 @@ async def _create_direct_connection(
975
975
continue
976
976
977
977
return transp , proto
978
- else :
979
- assert last_exc is not None
980
- raise last_exc
978
+ assert last_exc is not None
979
+ raise last_exc
981
980
982
981
async def _create_proxy_connection (
983
982
self ,
Original file line number Diff line number Diff line change @@ -82,7 +82,6 @@ async def _run(self) -> None:
82
82
83
83
ctx = self ._create_ssl_context (self .cfg ) if self .cfg .is_ssl else None
84
84
85
- runner = runner
86
85
assert runner is not None
87
86
server = runner .server
88
87
assert server is not None
Original file line number Diff line number Diff line change @@ -98,8 +98,7 @@ async def main(loop):
98
98
fake_facebook = FakeFacebook ()
99
99
info = await fake_facebook .start ()
100
100
resolver = FakeResolver (info )
101
- connector = aiohttp .TCPConnector (resolver = resolver ,
102
- verify_ssl = False )
101
+ connector = aiohttp .TCPConnector (resolver = resolver , ssl = False )
103
102
104
103
async with aiohttp .ClientSession (connector = connector ) as session :
105
104
async with session .get ('https://graph.facebook.com/v2.7/me' ,
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ async def logout(request):
34
34
return resp
35
35
36
36
37
- def init (loop ):
38
- app = web .Application (loop = loop )
37
+ def init ():
38
+ app = web .Application ()
39
39
app .router .add_get ('/' , root )
40
40
app .router .add_get ('/login' , login )
41
41
app .router .add_get ('/logout' , logout )
Original file line number Diff line number Diff line change 2
2
3
3
import aiohttp
4
4
import pathlib
5
- from aiohttp import hdrs
5
+ import aiohttp .hdrs
6
+ import multidict
6
7
from collections import defaultdict
7
8
import io
8
9
9
- headers = [getattr (hdrs , name )
10
- for name in dir (hdrs )
11
- if isinstance (getattr (hdrs , name ), hdrs .istr )]
10
+ headers = [getattr (aiohttp .hdrs , name )
11
+ for name in dir (aiohttp .hdrs )
12
+ if isinstance (getattr (aiohttp .hdrs , name ), multidict .istr )]
13
+
12
14
13
15
def factory ():
14
16
return defaultdict (factory )
@@ -26,6 +28,7 @@ def build(headers):
26
28
d [TERMINAL ] = hdr
27
29
return dct
28
30
31
+
29
32
dct = build (headers )
30
33
31
34
@@ -82,6 +85,7 @@ def build(headers):
82
85
}}
83
86
"""
84
87
88
+
85
89
def gen_prefix (prefix , k ):
86
90
if k == '-' :
87
91
return prefix + '_'
@@ -148,6 +152,7 @@ def gen_headers(headers):
148
152
# print(gen(dct).getvalue())
149
153
# print(gen_headers(headers).getvalue())
150
154
155
+
151
156
folder = pathlib .Path (aiohttp .__file__ ).parent
152
157
153
158
with (folder / '_find_header.c' ).open ('w' ) as f :
You can’t perform that action at this time.
0 commit comments