Skip to content

Commit

Permalink
fix(custom_tmp_file): Remove spurious trues return
Browse files Browse the repository at this point in the history
Remove ``return True`` from __exit__ as this supresses all errors.

References: #1
  • Loading branch information
rbpatt2019 committed Jun 15, 2021
1 parent 70b1ac1 commit b966609
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tests/custom_tmp_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __exit__(
ex_type: Optional[Type[BaseException]],
ex_val: Optional[BaseException],
tb: Optional[TracebackType],
) -> bool:
) -> None:
"""Call on exit from with statement.
Typing via `mypy`_.
Expand All @@ -76,10 +76,5 @@ def __exit__(
tb : Optional[TracebackType]
Traceback
Returns
-------
bool
True, if successful.
"""
os.unlink(self.filename)
return True

0 comments on commit b966609

Please sign in to comment.