pep8: Move to third_party/.
[Samba.git] / third_party / pep8 / testsuite / E30not.py
blob0fd8fb0c448af43048cba00f191457f715eafc94
1 #: Okay
2 class X:
3 pass
4 #: Okay
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:
19 def a():
20 pass
22 # comment
23 def b():
24 pass
26 # This is a
27 # ... multi-line comment
29 def c():
30 pass
33 # This is a
34 # ... multi-line comment
36 @some_decorator
37 class Y:
39 def a():
40 pass
42 # comment
44 def b():
45 pass
47 @property
48 def c():
49 pass
52 try:
53 from nonexistent import Bar
54 except ImportError:
55 class Bar(object):
56 """This is a Bar replacement"""
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
69 try:
70 next
71 except NameError:
72 def next(iterator, default):
73 for item in iterator:
74 return item
75 return default
78 def a():
79 pass
82 class Foo():
83 """Class Foo"""
85 def b():
87 pass
90 # comment
91 def c():
92 pass
95 # comment
98 def d():
99 pass
101 # This is a
102 # ... multi-line comment
104 # And this one is
105 # ... a second paragraph
106 # ... which spans on 3 lines
109 # Function `e` is below
110 # NOTE: Hey this is a testcase
112 def e():
113 pass
116 def a():
117 print
119 # comment
121 print
123 print
125 # Comment 1
127 # Comment 2
130 # Comment 3
132 def b():
134 pass