mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-31 15:07:42 -08:00
Clean Code: Python
Fix issues found by flake8-bugbear: * Unused loop variables * assert statements in non-test code * mixing test code with production code * mark one excessive test which takes ~10min to run as 'slow'
This commit is contained in:
@@ -882,7 +882,7 @@ def new_quadrant():
|
||||
if b3 > 0:
|
||||
b4, b5 = find_empty_place() # position of starbase (sector)
|
||||
insert_marker(b4, b5, ">!<")
|
||||
for i in range(s3):
|
||||
for _ in range(s3):
|
||||
r1, r2 = find_empty_place()
|
||||
insert_marker(r1, r2, " * ")
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ def get_yes_no(prompt):
|
||||
|
||||
|
||||
def print_header():
|
||||
for i in range(12):
|
||||
for _ in range(12):
|
||||
print()
|
||||
t10 = " " * 10
|
||||
print(t10 + "*************************************")
|
||||
@@ -24,7 +24,7 @@ def print_header():
|
||||
print(t10 + "* *")
|
||||
print(t10 + "* *")
|
||||
print(t10 + "*************************************")
|
||||
for i in range(8):
|
||||
for _ in range(8):
|
||||
print()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user