Skip to content

Commit

Permalink
docs: refines doc strings for results reporting classes
Browse files Browse the repository at this point in the history
Signed-off-by: Jennifer Power <[email protected]>
  • Loading branch information
jpower432 committed Apr 5, 2024
1 parent c675c38 commit 2d1ca2b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions trestlebot/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,6 @@ def is_github_actions() -> bool:


def set_output(name: str, value: str) -> None:
"""Set the output during the GitHub Actions workflow."""
with open(os.environ["GITHUB_OUTPUT"], "a") as fh:
print(f"{name}={value}", file=fh) # noqa: T201
3 changes: 0 additions & 3 deletions trestlebot/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ class GitLabCIResultsReporter(ResultsReporter):
def report_results(self, results: BotResults) -> None:
"""
Report the results of the Trestle Bot in GitLab CI
Args:
results: BotResults object
"""
results_str = ""
if results.commit_sha:
Expand Down
8 changes: 7 additions & 1 deletion trestlebot/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ class ResultsReporter:
"""

def report_results(self, results: BotResults) -> None:
"""Report the results of the Trestle Bot."""
"""
Report the results of the Trestle Bot.
Args:
results: BotResults object
"""
results_str = ""
if results.commit_sha:
results_str += f"\nCommit Hash: {results.commit_sha}"
Expand All @@ -44,5 +49,6 @@ def get_changes_str(changes: List[str]) -> str:
Notes: This method is starting off as a simple join of the changes list,
but is intended to be expanded to provide more detailed information about the changes.
The goal is consistent representation.
"""
return "\n".join(changes)

0 comments on commit 2d1ca2b

Please sign in to comment.