Python: Add type annotations to all 'print' functions (#662)

* Add test to superstartrek and fixes several issues in superstartrek - I probably introduced them 🙈
* Mastermind type annotations
This commit is contained in:
Martin Thoma
2022-03-21 10:41:14 +01:00
committed by GitHub
parent c444da93c0
commit 1b1d50986b
50 changed files with 241 additions and 172 deletions

View File

@@ -15,7 +15,7 @@ import random
BELLS_ON_SUCCESS = False
def print_with_tab(space_count, msg):
def print_with_tab(space_count: int, msg: str) -> None:
if space_count > 0:
spaces = " " * space_count
else:
@@ -24,7 +24,7 @@ def print_with_tab(space_count, msg):
print(spaces + msg)
def print_instructions():
def print_instructions() -> None:
print("LETTER GUESSING GAME")
print()
print("I'LL THINK OF A LETTER OF THE ALPHABET, A TO Z.")