Skip to content

Commit

Permalink
fixup: remove unnecessary wrapper method
Browse files Browse the repository at this point in the history
  • Loading branch information
seberm committed Sep 2, 2024
1 parent 0f8937f commit 7ee6f13
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tmt/steps/report/junit.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._wrapped, name)


def _add_result_properties(result_instance: tmt.Result) -> ResultWrapper:
""" Dynamically decorate the :py:class:`tmt.Result` instance - add ``properties`` attribute """
return ResultWrapper(result_instance)


class ResultsContext:
"""
The results context for Jinja templates.
Expand All @@ -115,7 +110,7 @@ class ResultsContext:

def __init__(self, results: list[tmt.Result]) -> None:
# Decorate all the tmt.Results with more attributes
self._results: list[ResultWrapper] = [_add_result_properties(r) for r in results]
self._results: list[ResultWrapper] = [ResultWrapper(r) for r in results]

def __iter__(self) -> Iterator[ResultWrapper]:
""" Possibility to iterate over results by iterating an instance """
Expand Down

0 comments on commit 7ee6f13

Please sign in to comment.