-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunasync
More file actions
executable file
·79 lines (72 loc) · 2.24 KB
/
unasync
File metadata and controls
executable file
·79 lines (72 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!venv/bin/python
import unasync
unasync.unasync_files(
fpath_list = [
"src/ahttpx/__init__.py",
"src/ahttpx/__version__.py",
"src/ahttpx/_body.py",
"src/ahttpx/_client.py",
"src/ahttpx/_connection.py",
"src/ahttpx/_content.py",
"src/ahttpx/_headers.py",
"src/ahttpx/_parsers.py",
"src/ahttpx/_pool.py",
"src/ahttpx/_quickstart.py",
"src/ahttpx/_response.py",
"src/ahttpx/_request.py",
"src/ahttpx/_server.py",
"src/ahttpx/_streams.py",
"src/ahttpx/_urlencode.py",
"src/ahttpx/_urlparse.py",
"src/ahttpx/_urls.py",
],
rules = [
unasync.Rule(
"src/ahttpx/",
"src/httpx/",
additional_replacements={"ahttpx": "httpx"}
),
]
)
unasync.unasync_files(
fpath_list = [
"tests/test_ahttpx/test_client.py",
"tests/test_ahttpx/test_content.py",
"tests/test_ahttpx/test_headers.py",
"tests/test_ahttpx/test_network.py",
"tests/test_ahttpx/test_parsers.py",
"tests/test_ahttpx/test_pool.py",
"tests/test_ahttpx/test_quickstart.py",
"tests/test_ahttpx/test_request.py",
"tests/test_ahttpx/test_response.py",
"tests/test_ahttpx/test_streams.py",
"tests/test_ahttpx/test_urlencode.py",
"tests/test_ahttpx/test_urls.py",
],
rules = [
unasync.Rule(
"tests/test_ahttpx/",
"tests/test_httpx/",
additional_replacements={"ahttpx": "httpx"}
),
]
)
for path in [
"tests/test_httpx/test_client.py",
"tests/test_httpx/test_content.py",
"tests/test_httpx/test_headers.py",
"tests/test_httpx/test_network.py",
"tests/test_httpx/test_parsers.py",
"tests/test_httpx/test_pool.py",
"tests/test_httpx/test_quickstart.py",
"tests/test_httpx/test_request.py",
"tests/test_httpx/test_response.py",
"tests/test_httpx/test_streams.py",
"tests/test_httpx/test_urlencode.py",
"tests/test_httpx/test_urls.py",
]:
with open(path, "r") as fin:
lines = fin.readlines()
lines = [line for line in lines if line != "@pytest.mark.trio\n"]
with open(path, "w") as fout:
fout.writelines(lines)