Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

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

Dylan M. Taylor8020cd081ce9
diff --git a/docs/showcase/__pycache__/run.cpython-314.pyc b/docs/showcase/__pycache__/run.cpython-314.pyc
new file mode 100644
index 000000000..de0f9a97e
Binary files /dev/null and b/docs/showcase/__pycache__/run.cpython-314.pyc differ
diff --git a/docs/showcase/run.py b/docs/showcase/run.py
index 828f8decc..05de581af 100644
--- a/docs/showcase/run.py
+++ b/docs/showcase/run.py
@@ -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