forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
100 lines (86 loc) · 1.33 KB
/
test.py
File metadata and controls
100 lines (86 loc) · 1.33 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
def e():
#A real comment
some_code()
x = y
some_more_code()
"Ignore single commented out lines as it is too difficult to tell whether they are code"
#class C(object):
a_bit_more_code()
return 1
def f(x):
if x:
do_something()
#else:
# do_something_else()
# Some non-code comments.
# Space immediately after scope start and between functions.
#
#class CommentedOut:
#
# def __init__(self):
# pass
#
# def method(self):
#
# pass
#
#def g(y):
# assert y
# with y:
# # Commented out comment
# if y:
# do_something()
# else:
# do_something_else()
#
#def h(z):
# '''Doc string
# '''
# # Commented out comment
#
# followed_by_space()
#
# more_code()
#def j():
# """ Doc string """
# pass
#def k():
#
# """ Doc string """
# pass
#def l():
#
# """
# Doc string
# """
#
# pass
#
#
#
#
#def m():
# pass
#
#
#
some_code_to_break_up_comments()
#with x:
# pass
#try:
# call()
#except Exception:
# pass
#except:
# pass
def a_function_to_break_up_comments():
pass
# An example explaining
# something which contains
# the following code:
#
# def f():
# call()
# x.y = z
# return x
#