pep8: Move to third_party/.
[obnox/samba/samba-obnox.git] / third_party / pep8 / testsuite / E30not.py
1 #: Okay
2 class X:
3     pass
4 #: Okay
5
6 def foo():
7     pass
8 #: Okay
9 # -*- coding: utf-8 -*-
10 class X:
11     pass
12 #: Okay
13 # -*- coding: utf-8 -*-
14 def foo():
15     pass
16 #: Okay
17 class X:
18
19     def a():
20         pass
21
22     # comment
23     def b():
24         pass
25
26     # This is a
27     # ... multi-line comment
28
29     def c():
30         pass
31
32
33 # This is a
34 # ... multi-line comment
35
36 @some_decorator
37 class Y:
38
39     def a():
40         pass
41
42     # comment
43
44     def b():
45         pass
46
47     @property
48     def c():
49         pass
50
51
52 try:
53     from nonexistent import Bar
54 except ImportError:
55     class Bar(object):
56         """This is a Bar replacement"""
57
58
59 def with_feature(f):
60     """Some decorator"""
61     wrapper = f
62     if has_this_feature(f):
63         def wrapper(*args):
64             call_feature(args[0])
65             return f(*args)
66     return wrapper
67
68
69 try:
70     next
71 except NameError:
72     def next(iterator, default):
73         for item in iterator:
74             return item
75         return default
76
77
78 def a():
79     pass
80
81
82 class Foo():
83     """Class Foo"""
84
85     def b():
86
87         pass
88
89
90 # comment
91 def c():
92     pass
93
94
95 # comment
96
97
98 def d():
99     pass
100
101 # This is a
102 # ... multi-line comment
103
104 # And this one is
105 # ... a second paragraph
106 # ... which spans on 3 lines
107
108
109 # Function `e` is below
110 # NOTE: Hey this is a testcase
111
112 def e():
113     pass
114
115
116 def a():
117     print
118
119     # comment
120
121     print
122
123     print
124
125 # Comment 1
126
127 # Comment 2
128
129
130 # Comment 3
131
132 def b():
133
134     pass