autograder.cli.common
1import sys 2import typing 3 4def print_no_match(label: str, query: typing.Union[typing.Any, None] = None) -> None: 5 """ Print a "no matching X found" error message to stdout. """ 6 7 if (query is not None): 8 query = str(query) 9 10 if (len(query) == 0): 11 query = None 12 13 message = f"No matching {label} found." 14 if (query is not None): 15 message = f"No matching {label} found: '{query}'." 16 17 print(message, file = sys.stderr)
def
print_no_match(label: str, query: Optional[Any] = None) -> None:
5def print_no_match(label: str, query: typing.Union[typing.Any, None] = None) -> None: 6 """ Print a "no matching X found" error message to stdout. """ 7 8 if (query is not None): 9 query = str(query) 10 11 if (len(query) == 0): 12 query = None 13 14 message = f"No matching {label} found." 15 if (query is not None): 16 message = f"No matching {label} found: '{query}'." 17 18 print(message, file = sys.stderr)
Print a "no matching X found" error message to stdout.