showcase: check the file is readable without an empty with-block (#3001)

This commit is contained in:
Dylan M. Taylor authored and GitHub committed 2026-10-25 21:13:45 -04:00
1 parent 387bed199f
commit 8020cd081c
2 files changed
+1 -2

No files matched your search

Binary file not shown.
+1 -2
View File
@@ -14,8 +14,7 @@ def _jsonl_path(arg):
if not path.is_file():
sys.exit(f"not a readable file: {arg}")
try:
with path.open("rb"):
pass
path.open("rb").close()
except OSError:
sys.exit(f"not a readable file: {arg}")
return path