mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 23:26:40 -08:00
Clean Code: Apply flake8-simplify to Python
Also flake8-comprehensions which was added to the CI For flake8-simplify, there are a few false-positives, e.g. https://github.com/MartinThoma/flake8-simplify/issues/115
This commit is contained in:
@@ -48,7 +48,7 @@ def print_rules():
|
||||
def pick_number():
|
||||
# Note that this returns a list of individual digits
|
||||
# as separate strings, not a single integer or string
|
||||
numbers = [i for i in range(10)]
|
||||
numbers = list(range(10))
|
||||
random.shuffle(numbers)
|
||||
num = numbers[0:3]
|
||||
num = [str(i) for i in num]
|
||||
|
||||
Reference in New Issue
Block a user