Skip to content

Commit

Permalink
use contextlib.suppress
Browse files Browse the repository at this point in the history
  • Loading branch information
xoudini committed Dec 18, 2024
1 parent 592c7c9 commit 4f80e98
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/postcar/utils/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ def _sys_path(path: str) -> t.Generator[None, None, None]:

yield

try:
with contextlib.suppress(ValueError):
sys.path.remove(path)
except ValueError:
pass


def add_path(f: "F[P, R]", *, path: str) -> "F[P, R]":
Expand Down

0 comments on commit 4f80e98

Please sign in to comment.