Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Commit b92866f

Browse files
committed
Changed the import statements so they are sorted alphabetically
1 parent a40fe76 commit b92866f

20 files changed

+29
-48
lines changed

examples/cacheclt.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
"""
55

66
import argparse
7-
import json
8-
import logging
9-
107
import asyncio
118
import asyncio.test_utils
9+
import json
10+
import logging
1211

1312

1413
ARGS = argparse.ArgumentParser(description='Cache client example.')

examples/cachesvr.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,12 @@
5757
"""
5858

5959
import argparse
60+
import asyncio
6061
import json
6162
import logging
6263
import os
6364
import random
6465

65-
import asyncio
66-
67-
6866
ARGS = argparse.ArgumentParser(description='Cache server example.')
6967
ARGS.add_argument(
7068
'--tls', action='store_true', dest='tls',

examples/crawl.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,15 @@
1515
# - Handle out of file descriptors directly? (How?)
1616

1717
import argparse
18+
import asyncio
19+
import asyncio.locks
20+
import cgi
21+
from http.client import BadStatusLine
1822
import logging
1923
import re
2024
import sys
2125
import time
2226
import urllib.parse
23-
import cgi
24-
from http.client import BadStatusLine
25-
26-
import asyncio
27-
import asyncio.locks
2827

2928

3029
ARGS = argparse.ArgumentParser(description="Web crawler")

examples/fetch0.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
"""Simplest possible HTTP client."""
22

3-
import sys
4-
53
import asyncio
4+
import sys
65

76

87
@asyncio.coroutine

examples/fetch1.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
This version adds URL parsing (including SSL) and a Response object.
44
"""
55

6+
import asyncio
67
import sys
78
import urllib.parse
89

9-
import asyncio
10-
1110

1211
class Response:
1312

examples/fetch2.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
This version adds a Request object.
44
"""
55

6+
import asyncio
7+
from http.client import BadStatusLine
68
import sys
79
import urllib.parse
8-
from http.client import BadStatusLine
9-
10-
import asyncio
1110

1211

1312
class Request:

examples/fetch3.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
chunked transfer-encoding. It also supports a --iocp flag.
55
"""
66

7+
import asyncio
8+
from http.client import BadStatusLine
79
import sys
810
import urllib.parse
9-
from http.client import BadStatusLine
10-
11-
import asyncio
1211

1312

1413
class ConnectionPool:

examples/fuzz_as_completed.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
"""Fuzz tester for as_completed(), by Glenn Langford."""
44

5+
import asyncio
56
import itertools
67
import random
78
import sys
89

9-
import asyncio
10-
1110

1211
@asyncio.coroutine
1312
def sleeper(time):

examples/qspeed.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/usr/bin/env python3
22
"""How fast is the queue implementation?"""
33

4-
import time
5-
64
import asyncio
5+
import time
76

87

98
print(asyncio)

examples/shell.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
"""Examples using create_subprocess_exec() and create_subprocess_shell()."""
22

33

4-
import signal
5-
64
import asyncio
75
from asyncio.subprocess import PIPE
6+
import signal
87

98

109
@asyncio.coroutine

examples/simple_tcp_server.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
fail if this port is currently in use.
99
"""
1010

11-
import sys
12-
1311
import asyncio
1412
import asyncio.streams
13+
import sys
1514

1615

1716
class MyServer:

examples/sink.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
"""Test service that accepts connections and reads all data off them."""
22

33
import argparse
4+
import asyncio
45
import os
56
import sys
67

7-
import asyncio
8-
98

109
ARGS = argparse.ArgumentParser(description="TCP data sink example.")
1110
ARGS.add_argument(

examples/source.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
"""Test client that connects and sends infinite data."""
22

33
import argparse
4-
import sys
5-
64
import asyncio
75
import asyncio.test_utils
6+
import sys
87

98

109
ARGS = argparse.ArgumentParser(description="TCP data sink example.")

examples/source1.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
"""Like source.py, but uses streams."""
22

33
import argparse
4-
import sys
5-
64
import asyncio
75
import asyncio.test_utils
6+
import sys
87

98

109
ARGS = argparse.ArgumentParser(description="TCP data sink example.")

examples/subprocess_attach_read_pipe.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env python3
22
"""Example showing how to attach a read pipe to a subprocess."""
33

4+
import asyncio
45
import os
56
import sys
67

7-
import asyncio
88

99
code = """
1010
import os, sys

examples/subprocess_attach_write_pipe.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/usr/bin/env python3
22
"""Example showing how to attach a write pipe to a subprocess."""
33

4+
import asyncio
5+
from asyncio.subprocess import PIPE
46
import os
57
import sys
68

7-
import asyncio
8-
from asyncio.subprocess import PIPE
99

1010
code = """
1111
import os, sys

examples/subprocess_shell.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
"""Example writing to and reading from a subprocess at the same time using
22
tasks."""
33

4-
import os
5-
64
import asyncio
75
from asyncio.subprocess import PIPE
6+
import os
87

98

109
@asyncio.coroutine

examples/tcp_echo.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
"""TCP echo server example."""
33

44
import argparse
5-
import sys
6-
75
import asyncio
6+
import sys
87

98

109
try:

examples/timing_tcp_server.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
fail if this port is currently in use.
99
"""
1010

11-
import sys
12-
import time
13-
import random
14-
1511
import asyncio
1612
import asyncio.streams
13+
import random
14+
import sys
15+
import time
1716

1817

1918
class MyServer:

examples/udp_echo.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
"""UDP echo example."""
33

44
import argparse
5-
import sys
6-
75
import asyncio
6+
import sys
87

98

109
try:

0 commit comments

Comments
 (0)