mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-31 23:17:38 -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:
@@ -55,7 +55,7 @@ def main():
|
||||
|
||||
pattern_height = len(pattern)
|
||||
pattern_width = 0
|
||||
for line_num, line in pattern.items():
|
||||
for _line_num, line in pattern.items():
|
||||
pattern_width = max(pattern_width, len(line))
|
||||
|
||||
min_x = 11 - pattern_height // 2
|
||||
@@ -94,7 +94,7 @@ def main():
|
||||
|
||||
p = 0
|
||||
g += 1
|
||||
for x in range(0, min_x):
|
||||
for _ in range(min_x):
|
||||
print()
|
||||
|
||||
for x in range(min_x, max_x + 1):
|
||||
@@ -120,7 +120,7 @@ def main():
|
||||
print("".join(line))
|
||||
|
||||
# line 295
|
||||
for x in range(max_x + 1, MAX_HEIGHT):
|
||||
for _ in range(max_x + 1, MAX_HEIGHT):
|
||||
print()
|
||||
|
||||
print()
|
||||
|
||||
Reference in New Issue
Block a user