-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_sample.py
55 lines (47 loc) · 1.17 KB
/
test_sample.py
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
from math import *
def LongFunctionNameWithManyLines():
"""This function is intentionally long and does nothing useful."""
x = 1
y = 2
z = 3
a = 4
b = 5
c = 6
d = 7
e = 8
f = 9
g = 10
h = 11
i = 12
j = 13
k = 14
l = 15
m = 16
n = 17
o = 18
p = 19
q = 20
r = 21
return x + y + z + a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r
def complex_function(n):
if n <= 1:
return n
elif n % 2 == 0:
return complex_function(n // 2)
else:
return complex_function(3 * n + 1)
class undocumented_class:
def __init__(self):
self.BadlyNamedVariable = 42
def undocumented_method(self):
pass
GLOBAL_CONSTANT = 10
def function_without_docstring():
print("This function has no docstring")
very_long_line = "This is a very long line that exceeds the maximum line length and should trigger a line length warning in our enhanced analysis."
if __name__ == "__main__":
print(LongFunctionNameWithManyLines())
print(complex_function(27))
obj = undocumented_class()
obj.undocumented_method()
function_without_docstring()