Compare commits
13 Commits
dev
...
a76126f4cb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a76126f4cb | ||
| 590ccf8093 | |||
|
|
c6a27a6b29 | ||
| 0274f01b6e | |||
|
|
a49f42efe5 | ||
| 8062ed4bfd | |||
|
|
ffd77057e3 | ||
| 279a01b897 | |||
| 77fd09e6d2 | |||
|
|
91c16cbc88 | ||
|
|
95831d5190 | ||
|
|
453414efb2 | ||
|
|
d11b349d5e |
@@ -19,10 +19,10 @@ import collections as col # 使用了 col 但 flake8 可能检测
|
||||
|
||||
|
||||
# 缺陷2: 未使用的变量
|
||||
def unused_variable_demo():
|
||||
"""演示未使用的变量"""
|
||||
result = calculate() # result 未被使用
|
||||
print("Function executed")
|
||||
# def unused_variable_demo():
|
||||
# """演示未使用的变量"""
|
||||
# result = calculate() # result 未被使用
|
||||
# print("Function executed")
|
||||
|
||||
|
||||
# 缺陷8: 行太长(风格问题)
|
||||
@@ -34,7 +34,7 @@ def long_line():
|
||||
def missing_spaces():
|
||||
"""缺少必要空格"""
|
||||
x=1+2
|
||||
y=3*4
|
||||
y=3*99
|
||||
if x==1:
|
||||
print(x)
|
||||
|
||||
@@ -45,10 +45,10 @@ import collections as col # 使用了 col 但 flake8 可能检测
|
||||
|
||||
|
||||
# 缺陷2: 未使用的变量
|
||||
def unused_variable_demo():
|
||||
"""演示未使用的变量"""
|
||||
result = calculate() # result 未被使用
|
||||
print("Function executed")
|
||||
# def unused_variable_demo():
|
||||
# """演示未使用的变量"""
|
||||
# result = calculate() # result 未被使用
|
||||
# print("Function executed")
|
||||
|
||||
|
||||
def calculate():
|
||||
|
||||
Reference in New Issue
Block a user