Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def main(name: str = "World"):
"""
if len(name) > 100:
raise UsageError("Invalid name: maximum length is 100 characters.")
if any(not c.isprintable() for c in name):
if not name.isprintable():
raise UsageError("Invalid name: control characters are not allowed.")

secho(f"Hello {name}! 👋", fg="green", bold=True)
Expand Down