mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 07:10:42 -08:00
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:
@@ -7,7 +7,7 @@ Ported by Dave LeCompte
|
||||
"""
|
||||
|
||||
|
||||
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:
|
||||
@@ -15,7 +15,7 @@ def print_with_tab(space_count, msg):
|
||||
print(spaces + msg)
|
||||
|
||||
|
||||
def print_diamond(begin_width, end_width, step, width, count):
|
||||
def print_diamond(begin_width, end_width, step, width, count) -> None:
|
||||
edgeString = "CC"
|
||||
fill = "!"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user