Skip to content

Commit

Permalink
fix: fixing mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dyga01 committed Nov 22, 2024
1 parent e6a2654 commit ae4cbf5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gatorgrade/output/check_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def __init__(
json_info,
path: Optional[str] = None,
diagnostic: str = "No diagnostic message available",
weight: int = 1,
):
"""Construct a CheckResult.
Expand All @@ -23,16 +24,18 @@ def __init__(
description: The description to use in output.
json_info: the overall information to be included in json output
diagnostic: The message to use in output if the check has failed.
weight: The weight of the check.
"""
self.passed = passed
self.description = description
self.json_info = json_info
self.diagnostic = diagnostic
self.path = path
self.run_command = ""
self.weight = weight

def display_result(
self, show_diagnostic: bool = False, percentage: float = None
self, show_diagnostic: bool = False, percentage: Optional[float] = None
) -> str:
"""Print check's passed or failed status, description, and, optionally, diagnostic message.
Expand Down Expand Up @@ -69,7 +72,9 @@ def __str__(self, show_diagnostic: bool = False) -> str:
message = self.display_result(show_diagnostic)
return message

def print(self, show_diagnostic: bool = False, percentage: float = None) -> None:
def print(
self, show_diagnostic: bool = False, percentage: Optional[float] = None
) -> None:
"""Print check's passed or failed status, description, and, optionally, diagnostic message.
If no diagnostic message is available, then the output will say so.
Expand Down

0 comments on commit ae4cbf5

Please sign in to comment.