Show More
@@ -10,53 +10,26 b' This contains aliases to hide python ver' | |||||
10 |
|
10 | |||
11 | from __future__ import absolute_import |
|
11 | from __future__ import absolute_import | |
12 |
|
12 | |||
13 | try: |
|
13 | import sys | |
|
14 | ||||
|
15 | if sys.version_info[0] < 3: | |||
14 | import cPickle as pickle |
|
16 | import cPickle as pickle | |
15 | pickle.dumps |
|
17 | import cStringIO as io | |
16 | except ImportError: |
|
|||
17 | import pickle |
|
|||
18 | pickle.dumps # silence pyflakes |
|
|||
19 |
|
||||
20 | try: |
|
|||
21 | import httplib |
|
18 | import httplib | |
22 | httplib.HTTPException |
|
19 | import Queue as _queue | |
23 | except ImportError: |
|
|||
24 | import http.client as httplib |
|
|||
25 | httplib.HTTPException |
|
|||
26 |
|
||||
27 | try: |
|
|||
28 | import SocketServer as socketserver |
|
20 | import SocketServer as socketserver | |
29 | socketserver.ThreadingMixIn |
|
21 | import urlparse | |
30 | except ImportError: |
|
|||
31 | import socketserver |
|
|||
32 | socketserver.ThreadingMixIn |
|
|||
33 |
|
||||
34 | try: |
|
|||
35 | import xmlrpclib |
|
22 | import xmlrpclib | |
36 | xmlrpclib.Transport |
|
23 | else: | |
37 | except ImportError: |
|
24 | import http.client as httplib | |
|
25 | import io | |||
|
26 | import pickle | |||
|
27 | import queue as _queue | |||
|
28 | import socketserver | |||
|
29 | import urllib.parse as urlparse | |||
38 | import xmlrpc.client as xmlrpclib |
|
30 | import xmlrpc.client as xmlrpclib | |
39 | xmlrpclib.Transport |
|
|||
40 |
|
||||
41 | try: |
|
|||
42 | import urlparse |
|
|||
43 | urlparse.urlparse |
|
|||
44 | except ImportError: |
|
|||
45 | import urllib.parse as urlparse |
|
|||
46 | urlparse.urlparse |
|
|||
47 |
|
31 | |||
48 | try: |
|
32 | stringio = io.StringIO | |
49 | import cStringIO as io |
|
|||
50 | stringio = io.StringIO |
|
|||
51 | except ImportError: |
|
|||
52 | import io |
|
|||
53 | stringio = io.StringIO |
|
|||
54 |
|
||||
55 | try: |
|
|||
56 | import Queue as _queue |
|
|||
57 | _queue.Queue |
|
|||
58 | except ImportError: |
|
|||
59 | import queue as _queue |
|
|||
60 | empty = _queue.Empty |
|
33 | empty = _queue.Empty | |
61 | queue = _queue.Queue |
|
34 | queue = _queue.Queue | |
62 |
|
35 |
@@ -6,7 +6,9 b'' | |||||
6 | run pyflakes on all tracked files ending in .py or without a file ending |
|
6 | run pyflakes on all tracked files ending in .py or without a file ending | |
7 | (skipping binary file random-seed) |
|
7 | (skipping binary file random-seed) | |
8 |
|
8 | |||
9 |
$ hg locate 'set:**.py or grep("^#!.*python")' |
|
9 | $ hg locate 'set:**.py or grep("^#!.*python")' \ | |
|
10 | > -X mercurial/pycompat.py \ | |||
|
11 | > 2>/dev/null \ | |||
10 | > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py" |
|
12 | > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py" | |
11 | tests/filterpyflakes.py:61: undefined name 'undefinedname' |
|
13 | tests/filterpyflakes.py:61: undefined name 'undefinedname' | |
12 |
|
14 |
General Comments 0
You need to be logged in to leave comments.
Login now